History Selectors
- getQueryParam
- getSortOrder
- getSearchPhrase
- getHistoryPathname
- getHistoryLength
- getQueryParamsAsString
- getHistoryLocation
- getRedirectLocation
getQueryParam
Section titled “getQueryParam”Retrieves a single URL parameter from the query parameters object.
import { getQueryParam } from '@shopgate/engage/core';Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7:
import { getQueryParam } from '@shopgate/pwa-common/selectors/history'
Parameters
Section titled “Parameters”state(Object) required: The application state.param(String) required: The dedicated URL parameter.
Returns
Section titled “Returns”(Array|null): The URL parameter value. If no parameter value is found, it returns null.
getSortOrder
Section titled “getSortOrder”Retrieves the sort order from the URL query parameters.
import { getSortOrder } from '@shopgate/engage/core';Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7:
import { getSortOrder } from '@shopgate/pwa-common/selectors/history'
Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(string|null): The current sort order. If no sort order is found, it returns null.
getSearchPhrase
Section titled “getSearchPhrase”Retrieves the search phrase from the URL query parameters.
import { getSearchPhrase } from '@shopgate/engage/core';Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7:
import { getSearchPhrase } from '@shopgate/pwa-common/selectors/history'
Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(string|null): The current search phrase. If no search phrase is found, it returns null.
getHistoryPathname
Section titled “getHistoryPathname”Retrieves the current history path name.
import { getHistoryPathname } from '@shopgate/engage/core';Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7:
import { getHistoryPathname } from '@shopgate/pwa-common/selectors/history'
Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(string |null): The history path name. If no value is returned, the selector returns null.
getHistoryLength
Section titled “getHistoryLength”Retrieves the length of the current history stack.
import { getHistoryLength } from '@shopgate/engage/core';Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7:
import { getHistoryLength } from '@shopgate/pwa-common/selectors/history'
Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(number|null): The current length of the history stack.
getQueryParamsAsString
Section titled “getQueryParamsAsString”Retrieves the query parameters from the history state as a pre-formatted string.
import { getQueryParamsAsString } from '@shopgate/engage/core';Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7:
import { getQueryParamsAsString } from '@shopgate/pwa-common/selectors/history'
Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(string|null): The current query parameters.
getHistoryLocation
Section titled “getHistoryLocation”Retrieves the history location from the history state.
import { getHistoryLocation } from '@shopgate/engage/core';Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7:
import { getHistoryLocation } from '@shopgate/pwa-common/selectors/history'
Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(string|null): The current history location. If no value is found, it returns null.
getRedirectLocation
Section titled “getRedirectLocation”Retrieves the current redirect location from the history state.
import { getRedirectLocation } from '@shopgate/engage/core';Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7:
import { getRedirectLocation } from '@shopgate/pwa-common/selectors/history'
Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(string|null): The current redirect location. If no value is found, it returns null.

