Skip to content

Main Stream

This is the most basic stream that Shopgate provides. The main stream triggers on every redux action that is dispatched. You can derive your own streams from it.

CAUTION: Do not use this stream directly. The only purpose of the main stream is to derive further streams from it!

import { main$ } from '@shopgate/engage/core';
const myCustomStream$ = main$.filter(({ action }) => action.type === 'MY_CUSTOM_ACTION_TYPE');

Attention: The following import path is deprecated. Use the path from the example above instead: import { main$ } from '@shopgate/pwa-common/streams/main'