Skip to content

Category Streams

Triggers when a category route prepares to enter.

import { categoryWillEnter$ } from '@shopgate/engage/category';
subscribe(categoryWillEnter$, ({ action, dispatch, getState, prevState, events }) => {
// The code you want to perform when the stream triggers.
})

Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7: import { categoryWillEnter$ } from '@shopgate/pwa-common-commerce/category'


Triggers when a category route enters.

import { categoryDidEnter$ } from '@shopgate/engage/category';
subscribe(categoryDidEnter$, ({ action, dispatch, getState, prevState, events }) => {
// The code you want to perform when the stream triggers.
})

Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7: import { categoryDidEnter$ } from '@shopgate/pwa-common-commerce/category'


Triggers when a category route leaves.

import { categoryDidLeave$ } from '@shopgate/engage/category';
subscribe(categoryDidLeave$, ({ action, dispatch, getState, prevState, events }) => {
// The code you want to perform when the stream triggers.
})

Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7: import { categoryDidLeave$ } from '@shopgate/pwa-common-commerce/category'


Triggers when the root category data is received.

import { receivedRootCategories$ } from '@shopgate/engage/category';
subscribe(receivedRootCategories$, ({ action, dispatch, getState, prevState, events }) => {
// The code you want to perform when the stream triggers.
})

Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7: import { receivedRootCategories$ } from '@shopgate/pwa-common-commerce/category'


Triggers if there is an error in any of the category data requests.

import { categoryError$ } from '@shopgate/engage/category';
subscribe(categoryError$, ({ action, dispatch, getState, prevState, events }) => {
// The code you want to perform when the stream triggers.
})

Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7: import { categoryError$ } from '@shopgate/pwa-common-commerce/category'