Shopify Hooks
Pack offers a library of hooks that make building your Shopify Storefront easy. These hooks are available to help you start developing customer and cart experience out-of-the-box right away.

Getting Started

Make sure to initialize your Storefront first

To get started it is important that you initialize the Storefront with the useStorefrontInit() hook inside your Storefront layout.
/src/layouts/Storefront.jsx
import { useStorefrontInit } from '@backpackjs/storefront';
function StorefrontLayout({ ContentForLayout, ...props }) {
// initialize customer, cart, shop and markets
useStorefrontInit();
...
}
Copy link