Global hooks

This guide provides a list of the global hooks offered in Hydrogen.


Global hooks are React hooks that relate to your entire app.


Hydrogen provides the following global hooks that you can use to fetch data from server components:

Hook name Description
useQuery A wrapper around useQuery from react-query. It supports Suspense calls on the server and on the client.
useServerState Manage a server state when using Hydrogen as a React Server Component framework.
useShop Access values within shopify.config.js.
useShopQuery Make server-only GraphQL queries to the Storefront API.

On this page