Template
Initial commit
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F22Ms5Cxam5UHyxaCrtZzu
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
import { createCartComponents } from "@shopify/hydrogen/react";
|
||||
|
||||
import type { cartHandlers } from "./cart-handlers";
|
||||
|
||||
/**
|
||||
* React cart bindings derived from the cart server handlers' type. The
|
||||
* `CartProvider` accepts the full handler data envelope (`{cart, errors?}`) as
|
||||
* `initialData` — see `hydrogen-cart-ui` / `references/react.md`. Do not unwrap
|
||||
* to `data.cart`: `{cart: null}` tells the client the server already checked.
|
||||
*/
|
||||
export const { CartProvider, useCart, useCartForm } = createCartComponents<typeof cartHandlers>();
|
||||
Reference in New Issue
Block a user