CartHydrator

cart · /react·component

Server-renderable entry point that seeds the client-side cart hydration marker. Delegates to a client component that renders a hidden element carrying the initial cart id and shop id, so the client layer can bootstrap without an extra network round-trip.

Signature

@nordcom/commerce-cart
function CartHydrator(__namedParameters: { initialCart: Cart; shopId: string }): Element;

Parameters

NameTypeDescription
__namedParameters{ initialCart: Cart; shopId: string }

Returns

A element.

Example

<CartHydrator initialCart={serverCart} shopId={shop.id} />

CartDevtools CartFormProps CartProviderProps AppCartConfig BaseCartActions BuyerIdentityActions CartActions CartAttributeActions

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

On this page