CartProviderProps

cart · /react·interface

Props for . Wires the kernel snapshot, mutation handler, and optional optimistic predictors into the React context tree.

Properties

children
ReactNode
initialCart
Cart<Cfg['ext']>
kernelSnapshot
KernelSnapshot<Cfg['caps']>
shopId
string
submitMutation
SubmitMutation<Cfg['ext']>

Example

const props: CartProviderProps<AppConfig> = {
    kernelSnapshot,
    submitMutation: submitCartMutation,
    initialCart,
    shopId: shop.id,
    children: <App />,
};

CartDevtools CartFormProps AppCartConfig BaseCartActions BuyerIdentityActions CartActions CartAttributeActions CartPredictor

Metadata@nordcom/commerce-cart@0.2.2Open in GitHub ↗

On this page