redux-state-cleaner
Easily reset your reducers to the initial state with only one action
Installation
npm i redux-store-cleaner -S
Features
- Reset store branches by sending 'undefined' in its reducers
- Clean specific reducer with namespace
Usage
Wrap your reducer with withStoreCleaner
function
; const someFancyReducer = { /* Impl */ }; someFancyReducer 'someFancyReducerNamespace';
and call cleanStore wherever you want
;; store;// You can also clean all stores with omitting namespace// store.dispatch(cleanStore('));
License
MIT © Andrew Paramoshkin