title: Keeping State After Component Unmounts
body: <p>I have an <code>Auth</code> component which is responsible for both <em>login</em> &amp; <em>sign up</em>. I simply receive a prop (<code>isSignup</code>) and display the appropriate form fields. I also use <code>react-router</code>:</p>
  
  <pre><code>&lt;BrowserRouter&gt;
      &lt;Route
          path="/signup" exact
          render={() =&gt; &lt;Auth isSignup /&gt;} /&gt;
      &lt;Route
          path="/login" exact
          render={() =&gt; &lt;Auth /&gt;} /&gt;
  &lt;/BrowserRouter&gt;
  </code></pre>
  
  <p>In the <code>Auth</code> component I have a state which holds the values of the form fields.</p>
  
  <p>I'd like to keep the state of <code>Auth</code> after it unmounts, i.e when <code>react-router</code> no longer renders it, so I can keep the values when the user switches between <code>/signup</code> and <code>/login</code>.</p>
  
  <p>Is there a way to do this without global state management (e.g Redux)?</p>