useApp
useApp()
Hook function for page elements.
Properties
installation
typeobject
An object with an id, installation status, and config objectid
typestring
Id of the current installationconfig
typeany
Object used to store installation relevant config informationstatus
typestring
Key ofAppInstallationStatus
context
typeobject
Contextual information.
An object with project and environment properties
Environment context, includingauthToken
,enpoint
,id
, andname
historyPush
typefunction
Function to redirect inside Hygraph (internal - path included)historyReplace
typefunction
Function to replace the current entry on the history stack inside Hygraph (internal - path included)openAssetPicker
typefunction
Function to open the Hygraph asset picker
See the Asset type in your Content API
openAssetPicker exampleopenDialog
typefunction
Opens a separate dialog where you can load data from an external source or create your own UI
openDialog documentationredirectParent
typefunction
Function to make a full redirect (external - hostname + path included)showToast
typefunction
Function to show Hygraph native toast
showToast documentationupdateInstallation
typefunction
Function to get the current app installation status, and update it
This function is only available inside thesetup
page
Installation status is a key ofAppInstallationStatus
Returns
<AppProps>
AppProps
are common props + installation