useShop

The useShop hook provides access to values within shopify.config.js.The useShop hook provides access to values within shopify.config.js. It must be a descendent of a ShopifyProvider component.

Example code

Return value

The useShop hook returns an object with the following keys:

Key Description
locale The locale set in shopify.config.js.
storeDomain The store domain set in shopify.config.js.
storefrontToken The Storefront API token set in shopify.config.js.
graphqlApiVersion The GraphQL API version set in shopify.config.js.