redux-assign-reducers
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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

/redux-assign-reducers/

    Package Sidebar

    Install

    npm i redux-assign-reducers

    Weekly Downloads

    81

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    2.27 kB

    Total Files

    4

    Last publish

    Collaborators

    • liammartens