Skip to content

User Streams

Triggers when a user submits the login form.

import { userWillLogin$ } from '@shopgate/engage/user';
subscribe(userWillLogin$, ({ 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 { userWillLogin$ } from '@shopgate/pwa-common/streams/user'


Triggers when the login request receives a response.

import { userLoginResponse$ } from '@shopgate/engage/user';
subscribe(userLoginResponse$, ({ 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 { userLoginResponse$ } from '@shopgate/pwa-common/streams/user'


Triggers when the user logged in.

import { userDidLogin$ } from '@shopgate/engage/user';
subscribe(userDidLogin$, ({ 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 { userDidLogin$ } from '@shopgate/pwa-common/streams/user'


Triggers when the user requests the logout action.

import { userWillLogout$ } from '@shopgate/engage/user';
subscribe(userWillLogout$, ({ 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 { userWillLogout$ } from '@shopgate/pwa-common/streams/user'


Triggers when the user logged out.

import { userDidLogout$ } from '@shopgate/engage/user';
subscribe(userDidLogout$, ({ 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 { userDidLogout$ } from '@shopgate/pwa-common/streams/user'


Triggers when the user data changes.

import { userDidUpdate$ } from '@shopgate/engage/user';
subscribe(userDidUpdate$, ({ 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 { userDidUpdate$ } from '@shopgate/pwa-common/streams/user'


Triggers when user data is received from the server.

import { userDataReceived$ } from '@shopgate/engage/user';
subscribe(userDataReceived$, ({ 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 { userDataReceived$ } from '@shopgate/pwa-common/streams/user'


Triggerswhen the login process fails.

import { loginDidFail$ } from '@shopgate/engage/user';
subscribe(loginDidFail$, ({ 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 { loginDidFail$ } from '@shopgate/pwa-common/streams/user'