multiple reducers redux code example
Example: multiple reducers redux
/* Reducer Composition */
import { createStore, combineReducers } from 'redux';
const rootReducer = combineReducers({
first: firstReducer,
second: secondReducer
});
const store = createStore(rootReducer);
/* About Redux.combineReducers()
* accepts an object in which keys are associated to specific
* reducer functions, these keys are used as the name for the
* associated piece of state
*/