This page was printed on Jan 20, 2020. For the current version, visit https://help.shopify.com/en/api/embedded-apps/app-bridge/actions/navigation/history.
Create an app and import the History module from @shopify/app-bridge/actions. Note that we'll be referring to this sample application throughout the examples below.
Push a new history entry containing the relative app path
The path is relative to the app origin and must be prefixed with a slash. Adding a history entry does not redirect the app:
Replace the current history entry with the relative app path
The path is relative to the app origin and must be prefixed with a slash. Replacing the history entry does not redirect the app:
Subscribe to actions
You can subscribe to actions dispatched through the specific history action set:
Subscribe to all history actions
You can subscribe to all history actions, regardless of which action sets trigger the actions: