title: useState retention scope
body: <p>Components A, B and C are functional components. If someState is true and component A is visited, will the useState variables retain their values when arriving back at this module?</p>
  
  <p>The return from A is handled in this main module by passing a callback function to A which resets someState.</p>
  
  <pre><code>const [someState, setSomeState] = useState()
  const [anotherState, setAnotherSate] = useState()
  ...
  
  const handleRemoveDetail = () =&gt; {
     someState(0);
   };
  
  return (
    {someState onRemoveDetail={handleRemoveDetail} ? (
      &lt;A /&gt;
    ) : (
      &lt;div&gt;
        &lt;B /&gt;
        &lt;C /&gt;
      &lt;/div&gt;
    )}
  )
  </code></pre>