combinedReducer<S> function

Reducer<S> combinedReducer<S>(
  1. Iterable<Reducer<S>> reducers
)

Implementation

Reducer<S> combinedReducer<S>(
  Iterable<Reducer<S>> reducers
) => (dynamic action, S previousState) async {
  return reducers.fold<Future<S>>(
    Future.sync(() => previousState),
    (previousState, reducer) async {
      return reducer(action, await previousState);
    }
  );
};