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 (u1 and
u1
In addition to Dan Abramov's answer, shouldn't we explicitly set action as action = {type: '@@INIT'} alongside state = undefined. With above action type, every reducer returns the initial state.