1.0.2 • Published 5 years ago

redux-assign-reducers v1.0.2

Weekly downloads
77
License
ISC
Repository
-
Last release
5 years ago

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: {}
 * }
 */