use Shophook
Provides access to the prop of
.
Anchor to useShopuse Shop()
must be a descendent of a
component.
Anchor to useShop-returnsReturns
ShopifyContextValue
The code designating a country, which generally follows ISO 3166-1 alpha-2 guidelines. If a territory doesn't have a country code value in the enum, it might be considered a subdivision of another country. For example, the territories associated with Spain are represented by the country code
, and the territories associated with the United States of America are represented by the country code
.
Returns an object that contains headers that are needed for each query to Storefront API GraphQL endpoint. This uses the public Storefront API token.
By default, it will use the config you passed in when creating . However, you can override the following settings on each invocation of
:
Creates the fully-qualified URL to your myshopify.com domain.
By default, it will use the config you passed in when calling . However, you can override the following settings on each invocation of
:
Creates the fully-qualified URL to your store's GraphQL endpoint.
By default, it will use the config you passed in when creating . However, you can override the following settings on each invocation of
:
language codes supported by Shopify.
The full domain of your Shopify storefront URL (eg: the complete string of {subdomain}.myshopify.com
).
The Storefront API version. This should almost always be the same as the version Hydrogen React was built for. Learn more about Shopify API versioning for more details.
The Storefront API public access token. Refer to the authentication documentation for more details.
The globally-unique identifier for the Shop