App state
You can access the app state using a React hook.
useAppBridgeState
Anchor link to section titled "useAppBridgeState"The useAppBridgeState
hook supports accessing all or parts of the application state, including keys like context
, features
, and staffMember
. For more information about options, refer to Props.
Example code
Anchor link to section titled "Example code"Get the entire app state with no arguments.
Get a specific piece of the app state with an argument.
Name | Type | Description | Required |
---|---|---|---|
state | "cart" , "client" , "context" , "contextualSaveBar" , "features" , "fullscreen" , "isLegacy" , "loading" , "menu" , "modal" , "navigation" , "pos" , "print" , "resourcePicker" , "scanner" , "sessionToken" , "share" , "staffMember" , "titleBar" , "toast" |
Key in app state to access | No |