October 2019
Intermediate to advanced
426 pages
11h 49m
English
Finally, we need to combine our other reducers into a single reducer for our app state. Let's define the appReducer function now:
export default function appReducer (state, action) {
return { todos: todosReducer(state.todos, action), filter: filterReducer(state.filter, action) }}
Now, our reducers are grouped together. So, we only have one state object and one dispatch function.
Read now
Unlock full access