useCustomer: Hook to access Customer data (theme, etc.)
useHasMounted: Hook to properly handle expected differences between server and browser rendering.
Helps to avoid "Text content did not match" warnings, during React rehydration.
useI18n: Hook to access i18n/localisation data
usePreviewMode: Hook to access the native Next.js preview mode data/status
useUserSession: Hook to access the user session data
Hook to access customer data
The customer data are pre-fetched, either during SSR or SSG and are not meant to be fetched or modified by the app (they're kinda read-only)
Thus, it's fine to use React Context for this kind of usage.
If you don't know why, you should read more about it .
Long story short, React Context is better be used with data that doesn't mutate, like theme/localisation
If you need to handle a global state that changes over time, your should rather use a dedicated library (opinionated: I'd probably use Recoil)
This hook helps rendering content only when the component has mounted (client-side).
It's helpful when you want some part of your app to only render on the client.
We strongly recommend reading The perils of rehydration to familiarise yourself with this.
This hook helps access i18n data in any functional component.
This hook helps access Next.js native Preview Mode data/status in any functional component.
This hook helps access user data in any functional component.