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
for me what worked the best is to set the initialState instead of state:
initialState
state
const reducer = createReducer(initialState, on(proofActions.cleanAdditionalInsuredState, (state, action) => ({ ...initialState })),