CartProvider
●cart · /react·component
Root context provider for the Nordcom cart. Manages the optimistic mutation queue, projects the cart for all slice hooks, synchronizes state with cross-tab broadcasts, and optionally keeps buyer identity in sync via a client auth bridge.
Signature
function CartProvider(props: CartProviderProps<Cfg>): Element;Parameters
| Name | Type | Description |
|---|---|---|
props | CartProviderProps<Cfg> |
Returns
A stack of React context providers wrapping children.
Example
<CartProvider
kernelSnapshot={kernelSnapshot}
submitMutation={submitCartMutation}
initialCart={initialCart}
shopId={shop.id}
>
{children}
</CartProvider>Related
CartDevtools CartFormProps CartProviderProps AppCartConfig BaseCartActions BuyerIdentityActions CartActions CartAttributeActions
CartProviderProps
Props for . Wires the kernel snapshot, mutation handler, and optional optimistic predictors into the React context tree.
ClientAuthBridge
Minimal React hook contract that exposes buyer identity to without coupling the cart to a specific auth library. Implement this interface in the host app and pa