title: How to clear props.location.state on refresh?
body: <p>I am navigating to another page where in am passing some data like so:</p>
  
  <pre><code>this.props.history.push({
    pathname: "/someotherpage",
    state: { somedata: somedata }
  });   
  </code></pre>
  
  <p>Now on <code>/someotherpage</code>, I have a condition in my <code>render()</code> method to show a component depending on whether <code>this.props.location.state</code> is not null.</p>
  
  <pre><code>{this.props.location.state &amp;&amp; (
      &lt;SomeComponent&gt;
          {this.props.location.state.somedata}
      &lt;/SomeComponent&gt;
  )}
  </code></pre>
  
  <p>It's working. However, when I refresh the page, <code>&lt;SomeComponent&gt;</code> still shows up as it still has the <code>this.props.location.state.somedata</code> stored even if I refresh. How do I clear <code>this.props.location.state</code> back to null when refreshing the page? (It seems to clear though when navigating away, only on refresh it gets retained.)</p>