combined-reduction
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

combined-reduction

Like Redux's combineReducers, but more better!

Nested Reducers

Everyone loves a little hierarchy! Place your reducers at any depth in the store:

const reducer = combinedReduction({
  session: session.reducer,
  entities: {
    users: users.reducer,
  },
});

Top Level Reducers

Now, you could use compose to chain together multiple top level reducers, but what's the fun in that?

How about declaring all your reducers in one handy place:

const reducer = combinedReduction(
  migrations.reducer,
  {
    session: session.reducer,
    entities: {
      users: users.reducer,
    },
  },
);

Top level reducers are passed directly as arguments, and are processed in order.

/combined-reduction/

    Package Sidebar

    Install

    npm i combined-reduction

    Weekly Downloads

    8

    Version

    1.1.0

    License

    Apache-2.0

    Last publish

    Collaborators

    • convoy_artifactory
    • convoy_ci
    • convoy_admin
    • nevir
    • aowainati
    • donvoy