redux-assign-reducers
v1.0.2
Published
Merges reducers together like an Object.assign
Downloads
271
Readme
Redux Assign Reducers
Combines reducers into a root reducer.
Example
import { assignReducers } from 'redux-assign-reducers';
const rootReducer = (state, action) => {}
const reducers = {
tomato: (state, action) => {},
potato: (state, action) => {}
}
const reducer = assignReducers(rootReducer, reducers);
/**
* The resulting reducer will generate the following state
* {
* // the result of the rootReducer,
* tomato: {},
* potato: {}
* }
*/