ngrx-store-reset
@ngrx/store meta reducer to reset the state.
Installation
npm i --save ngrx-store-reset
OR
yarn add ngrx-store-reset
Usage
1. Setup
;; ; // Pass your action type (the one you'd like to reset the state) to the metareducer ;
Options
action
: specify the action to listen for to reset the state (defaults toRESET_STORE
).
2. Resetting the state
Just dispatch your action, the metareducer will do the job.
;; ;