Interface: CartStoreConfig
Properties
getActions
getActions: () =>
CartActions
Getter for DI actions — called on every operation (not captured).
Returns
onExpired?
optionalonExpired?: (event) =>void
Called when a stale-cart event terminates an operation:
state-dependent— bail-on-stale operation (updateQuantity,removeFromCart) cannot be safely replayed on a new cart.recreate-failed— recovery attempted but creating the replacement cart failed (network / backend error).retry-also-failed— replacement cart also rejected by backend (rare; usually indicates a backend race / bug).
Typical UI usage: subscribe once globally and surface a toast / banner inviting the user to add products again.
Parameters
event
Returns
void
onMutationError?
optionalonMutationError?: (action,error) =>void
Called on mutation error.
Parameters
action
error
unknown
Returns
void
onMutationSuccess?
optionalonMutationSuccess?: (action,cart) =>void
Called after successful mutation.
Parameters
action
cart
Returns
void