August 2017
Beginner
374 pages
10h 41m
English
This time we will do something a little different in the src/reducers/index.js file. Instead of re-exporting all reducers, we import all reducers, then export a single root reducer, which we create using the combineReducers helper from the Redux library:
import { combineReducers } from 'redux'
import usersReducer from './users'
import postsReducer from './posts'
import filterReducer from './filter'
const appReducer = combineReducers({ users: usersReducer, posts: postsReducer, filter: filterReducer, }) export default appReducer ...Read now
Unlock full access