combined-reduction
v1.1.0
Published
Like Redux's combineReducers, but more better!
Downloads
45
Keywords
Readme
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.