ClientAuthBridge
●cart · /react·type
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 pass it via CartProviderProps.clientAuthBridge.
Properties
PROPTYPEDESCRIPTION
useBuyerIdentity
unknown
Example
const bridge: ClientAuthBridge = {
useBuyerIdentity() {
const { user } = useAuth();
return { identity: user ? { email: user.email } : null, updatedAt: user?.updatedAt ?? 0 };
},
};Related
CartDevtools CartFormProps CartProviderProps AppCartConfig BaseCartActions BuyerIdentityActions CartActions CartAttributeActions
CartProvider
Root context provider for the Nordcom cart. Manages the optimistic mutation queue, projects the cart for all slice hooks, synchronizes state with crosstab broad
DiscountActions
Discountcode mutation methods added to when CartCapabilities.multipleDiscountCodes is true. Apply or remove a discount code by its string value.