rdx-stack-creator

1.1.0 • Public • Published

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')
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i rdx-stack-creator

Weekly Downloads

1

Version

1.1.0

License

ISC

Last publish

Collaborators

  • fumblingfish