combineReducers Function
combineReducers<A>(reducers: A): (state: CombinedReducerState<A>, action: ReducerActions<>) => CombinedReducerState<A>
Parameter |
Type |
Description |
reducers |
A |
An object whose values correspond to different reducer functions that need to be combined into one. One handy way to obtain it is to use ES6 import * as reducers syntax. The reducers may never return undefined for any action. Instead, they should return their initial state if the state passed to them was undefined, and the current state for any unrecognized action.
Returns: A reducer function that invokes every reducer inside the passed object, and builds a state object with the same shape. |
Returns - (state: CombinedReducerState<A>, action: ReducerActions<>) => CombinedReducerState<A>
Defined in
Last Updated: 30 January, 2025