I am using Redux for state management.
How do I reset the store to its initial state?
For example, let’s say I have two user accounts (
Imagine the following sequence of events:
u1logs into the app and does something, so we cache some data in the store.
u2logs into the app without refreshing the browser.
At this point, the cached data will be associated with
u1, and I would like to clean it up.
How can I reset the Redux store to its initial state when the first user logs out?
Subscribe to get latest updates