Shopify Provider
The ShopifyProvider component wraps your entire app and provides functionality for many components, hooks, and utilities. The ShopifyProvider component also provides localization data for the app. You should place it in your app's entry point component. When sameDomainForStorefrontApi is enabled, Storefront API requests use the current origin, which requires a proxy setup.
Anchor to propsProps
Shopify-specific values that are used in various Hydrogen React components and hooks.
- Anchor to countryIsoCodecountry
Iso Codecountry Iso Code CountryCodeCountryCoderequiredrequired 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 codeES, and the territories associated with the United States of America are represented by the country codeUS.- Anchor to languageIsoCodelanguage
Iso Codelanguage Iso Code LanguageCodeLanguageCoderequiredrequired ISO 369language codes supported by Shopify.- Anchor to storeDomainstore
Domainstore Domain stringstringrequiredrequired The full domain of your Shopify storefront URL (eg: the complete string of
{subdomain}.myshopify.com).- Anchor to storefrontApiVersionstorefront
Api Versionstorefront Api Version stringstringrequiredrequired 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.
- Anchor to storefrontTokenstorefront
Tokenstorefront Token stringstringrequiredrequired The Storefront API public access token. Refer to the authentication documentation for more details.
- Anchor to childrenchildrenchildrenReactNodeReactNode
React children to render.
- Anchor to sameDomainForStorefrontApisame
Domain For Storefront Apisame Domain For Storefront Api booleanboolean Uses the current window.location.origin for Storefront API requests. This requires setting up a proxy for Storefront API requests in your domain.
- Anchor to storefrontIdstorefront
Idstorefront Id stringstring The globally-unique identifier for the Shop