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
import React from 'react'
import { Provider } from 'react-redux'
import { createStore } from 'duxegg'
import * as modules from './modules'
const config = {
foo: {
key: 'value'
}
}
const App = () =>
<Provider store={createStore(modules, config)}>
...
</Provider>
export default App
import * from 'foo'
export {
foo
}
import { handleActions } from 'redux-actions'
import createSagaMiddleware from 'redux-saga'
const module = (config) => {
const middleware = createSagaMiddleware()
const reducer = handleActions({
...
})
const saga = function* saga() {
...
}
const run = (store) => {
const modules = store.getModules()
}
return {
middleware,
reducer,
saga
}
}
export {
module
}