Przejdź do głównej zawartości

Interface: UseCartOptions

Properties

autoFetch?

optional autoFetch?: boolean

Fetch the cart automatically when the hook mounts. Set to false when the server has already pre-rendered the cart and you want to seed the store instead of double-fetching. Default true.


initialCart?

optional initialCart?: CartFragment | null

Pre-loaded cart used as the initial store value — e.g. the cart already resolved on the server during SSR. Combine with autoFetch: false to avoid a duplicate round-trip on hydration.