title: Does session storage have a delay while fetching?
body: <p>In my react code, inside a component, I am fetching a value from session storage(inside useEffect hook). When console printed, it shows the value.
  But inside the render(or return method), it does not have the value just fetched. Is there a delay while fetching from session storage?</p>
  
  <p>Circumvented the problem after storing the same in state and fetching inside render!</p>
  
  <pre><code>let myValue = '';
  useEffect(()=&gt;{
      myValue = sessionStorage.getItem("someKey");
  },[]);
  // In the return method
  return {
      &lt;div&gt;{myValue}&lt;/div&gt;
  }
  </code></pre>
  
  <p>Why does value fetched from session storage not available immediately in render?</p>