duxegg
Simple module concept for redux
Benefits
- Simple module concept for abstracting redux dependencies from one another
- Modules are easy to compose together
- Simple hook system for tapping in to redux lifecycle
- Provides a framework for building out an entire application (if desired)
Build Status
Install
npm install --save duxegg
Usage
// app.js const config = foo: // config passed to module is based on name of module key: 'value' const App = <Provider store=> ... </Provider>
// modules/index.js
// modules/foo/index.js const module = { const middleware = const reducer = const saga = { ... } const run = { // store is a redux store with an additional getModules method const modules = store // do whatever you need to boot up this module or process some value from the other modules } return middleware reducer saga }