rdx-stack-creator
v1.1.0
Published
```javascript import {initializeStack} from 'rdx-stack-creator'
Downloads
1
Readme
rdx-stack-creator
import {initializeStack} from 'rdx-stack-creator'
export const {
push,
pop,
popToKey,
popToIndex,
removeByKey,
removeAll,
createReducer
} = initializeStack('MY_STACK', 'stack') // suffix, stackKey
const stackreducer = createReducer({}) // add initial state
export default stackreducer
export const stackSelector = {
getItems: (state) => state.stackReducer.get('stack')
}