ForEachIterableReducer<State, Action, Environment> extension
Extension providing forEach variants for applying a reducer to each
element in a collection.
- on
-
- Reducer<
State, Action, Environment>
- Reducer<
Methods
-
forEach<
GlobalState, GlobalAction, GlobalEnvironment, ID> ({required Lens< GlobalState, Iterable< stateLens, required Prism<State> >GlobalAction, Action, ID> actionPrism, required ID toID(State state), Environment toLocalEnvironment(ID, GlobalEnvironment)?}) → Reducer<GlobalState, GlobalAction, GlobalEnvironment> -
Available on Reducer<
Applies this reducer to a specific element in a collection, identified byState, Action, Environment> , provided by the ForEachIterableReducer extensiontoID. -
forEachIndexed<
GlobalState, GlobalAction, GlobalEnvironment> ({required Lens< GlobalState, Iterable< stateLens, required Prism<State> >GlobalAction, Action, int> actionPrism, required Environment toLocalEnvironment(int, GlobalEnvironment)}) → Reducer<GlobalState, GlobalAction, GlobalEnvironment> -
Available on Reducer<
Like forEach, but identifies elements by their index in the collection rather than a custom ID function.State, Action, Environment> , provided by the ForEachIterableReducer extension -
forEachMap<
GlobalState, GlobalAction, GlobalEnvironment, ID> ({required Map< ID, State> toMapState(GlobalState), required GlobalState toGlobalState(GlobalState, Map<ID, State> ), required (ID, Action)? toLocalAction(GlobalAction), required GlobalAction toGlobalAction(ID, Action), required Environment toLocalEnvironment(ID, GlobalEnvironment)}) → Reducer<GlobalState, GlobalAction, GlobalEnvironment> -
Available on Reducer<
Like forEach, but operates on aState, Action, Environment> , provided by the ForEachIterableReducer extensionMap<ID, State>instead of anIterable<State>.