1.0.0 • Published 8 years ago
redux-get v1.0.0
Redux Get
Redux enhancer to access state props and selectors via a simple store.get() method.
Install
npm i --save redux-getAPI
createGetters(selectors)
selectors
A single map containing all the selectors with a similar shape as your reducer.
store.get(selector)
selector
A selector function, object.dot.path or ['array', 'path'].
Returns the store value.
store.getSelectors()
Returns the selectors map.
store.createGetter(paths)
A selector object.dot.path or ['array', 'path'].
Returns a selector function.
Usage
const store = createStore(reducer, createGetters(selectors))Related
If you would like to access selectors as straight up getters from the state object returned by store.getState() have a look at this project https://github.com/luwes/redux-proxy-selectors
1.0.0
8 years ago