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
Simply have your logout link clear session and refresh the page. No additional code needed for your store. Any time you want to completely reset the state a page refresh is a simple and easily repeatable way to handle it.