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

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i rdx-stack-creator

    Weekly Downloads

    2

    Version

    1.1.0

    License

    ISC

    Last publish

    Collaborators

    • fumblingfish