redux-store-reset

1.0.4 • Public • Published

redux-store-reset

// your reducers file
import { combineReducers } from 'redux'
import { reducer as storeResetReducer } from 'redux-store-reset'
...

const rootReducer = storeResetReducer(combineReducers({ ... }))
export default rootReducer

You can dispatch action with type == 'RESET_STORE', and store will be reseted

Customization

const options = {
    type: 'MY_OWN_RESET_TYPE'
}
const rootReducer = storeResetReducer(combineReducers({ ... }), options)

Now you can use action with type == 'MY_OWN_RESET_TYPE' to reset store

Readme

Keywords

Package Sidebar

Install

npm i redux-store-reset

Weekly Downloads

0

Version

1.0.4

License

ISC

Last publish

Collaborators

  • octav47