GitHub

daffCartReducer

Calls each of the individual cart reducers in turn, passing the returned state into the next.

import { daffCartReducer } from '@daffodil/cart/state'
function daffCartReducer<T extends DaffCart = DaffCart>(
  state: DaffCartReducerState<any> = daffCartReducerInitialState
  action: ActionTypes<T, DaffCartItemInput, DaffCartOrderResult>
): DaffCartReducerState<T>