The astx-redux-util library promotes several redux reducer composition utilities, which blend multiple reducers together forming a richer abstraction through functional decomposition (i.e. higher-order functions).
Reducer composition is not new. Redux itself provides the innovative combineReducers utility which allows you to fuse individual reducers together to build up the overall shape of your application state.
The most prevalent astx-redux-util utility is
which lets you combine sub-reducers in such a way as to eliminate
the switch statement commonly used to delineate action type.
Additionally, astx-redux-util promotes other reducer compositions that can be used in conjunction with one another.
At a Glance
Getting Started... installation and access
reducerHash(), eliminate the switch statement commonly found in reducers ("look ma, no switch")
Conditional Reduction... using
conditionalReducer(), invoke a reducer only when certain constraints are met ("to reduce or NOT to reduce; that is the question")
Joining Reducers... using
joinReducers(), team up multiple reducers to promote higher order functionality ("working together is success" - Henry Ford)
A Most Excellent Example... a more complete example employing many of the astx-redux-util utility functions
API Reference... details the low-level functional API
originalReducerState... a sidebar discussion of originalReducerState
Extending astx-redux-util... how would one extend astx-redux-util?
Logging Extension... a concrete example of reducer-based centralized logging ("smarter logging")
Distribution... where to find this utility (and a local copy of the docs)
Why astx-redux-util?... why was astx-redux-util created, and how does it compare to other utilities
Revision History... peruse various revisions
MIT License... legal stuff