useCartCount

cart · /react·function

Read the optimistic-aware total quantity from the nearest cart provider.

Signature

@nordcom/commerce-cart
function useCartCount(): number;

Returns

The summed line quantity used to drive cart badges. Re-renders only when the count slice changes.

CartDevtools CartFormProps CartProviderProps AppCartConfig BaseCartActions BuyerIdentityActions CartActions CartAttributeActions

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

On this page