Search code examples
angularreduxstatestorengrx

where redux ngrx store save in browser and how to remove state manually


I am new to redux and ngrx. I am able to use state but unable to understand where the data is getting saved in browser. How to remove the state manually if it is saved in browser.


Solution

  • According to this stackoverflow answer:

    it's stored in memory, so it is not persistent

    Also, you don't need to access memory to remove state, you can just clear it or go back to the original state (supposing that the original state is empty).

    On how to clear it, you can dispatch an action and inside your reducer you return initialState;.