simplifr-redux
v0.0.2
Published
Useful simplifr redux utilities.
Downloads
2
Maintainers
Readme
simplifr-redux
Some auxiliary utilities that make simplifr and redux closer.
API Reference
combineReducers(reducers)
Takes an object of reducer arrays, returns combined reducer function
Eg,
...
import {simplify} from 'simplifr'
import {combineReducers} from 'simplifr-redux'
const initialState = {
path: {
to: {
component1: {
data: {/* JSON */}
},
component2: {
data: {/* JSON */}
}
}
}
}
const reducers = {
`root.path.to.component1.data`: [reducer11, reducer12],
`root.path.to.component2.data`: [reducer21, reducer22]
}
const store = createStore(combineReducers(reducers), simplify(initialState))
...
License
MIT