0.0.2 • Published 8 years ago

simplifr-redux v0.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

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