Data Fetching
Block state
The content and customizer values can be retrieved in the block through useBlockState
.
This hook returns the filled in content from the CMS, and the customizer values as configured in the Instant admin.
Shopify data
To get data from the Shopify store that the storefront is connected to, use useShopifyClient
.
This hook returns a GraphQL client, so you can query Shopify's Storefront API with your own custom queries.
See the example.