title: How to reset the state of a Redux store?
body: <p>I am using Redux for state management.<br>
  How do I reset the store to its initial state?</p>
  
  <p>For example, let’s say I have two user accounts (<code>u1</code> and <code>u2</code>).<br>
  Imagine the following sequence of events:</p>
  
  <ol>
  <li><p>User <code>u1</code> logs into the app and does something, so we cache some data in the store.</p></li>
  <li><p>User <code>u1</code> logs out.</p></li>
  <li><p>User <code>u2</code> logs into the app without refreshing the browser.</p></li>
  </ol>
  
  <p>At this point, the cached data will be associated with <code>u1</code>, and I would like to clean it up.</p>
  
  <p><strong>How can I reset the Redux store to its initial state when the first user logs out?</strong></p>