Scanner Streams

scannerDidEnter$

Triggers when the default scanner’s route is entered.

Usage

import { scannerDidEnter$ } from '@shopgate/engage/scanner';

subscribe(scannerDidEnter$, ({ action, dispatch, getState, prevState, events }) => {
  // The code you want to perform when the stream triggers.
})

scannerFinished$

Triggers when the scanner finishes scanning something.

Usage

import { scannerFinished$ } from '@shopgate/engage/scanner';

subscribe(scannerFinished$, ({ action, dispatch, getState, prevState, events }) => {
  // The code you want to perform when the stream triggers.
})

scannerFinishedBarCode$

Triggers when the scanner completes a barcode scan.

Usage

import { scannerFinishedBarCode$ } from '@shopgate/engage/scanner';

subscribe(scannerFinishedBarCode$, ({ action, dispatch, getState, prevState, events }) => {
  // The code you want to perform when the stream triggers.
})

scannerFinishedQrCode$

Triggers when the scanner completes a QR code scan.

Usage

import { scannerFinishedQrCode$ } from '@shopgate/engage/scanner';

subscribe(scannerFinishedQrCode$, ({ action, dispatch, getState, prevState, events }) => {
  // The code you want to perform when the stream triggers.
})