title: How to update the router state on history.replace in react router?
body: <p>My react router has state <code>isActive(boolean)</code> value. When I use the Link component to redirect to different route I can update the state as follows and its working fine:-</p>
  
  <pre><code>&lt;Link to={{
          pathname: "my-home-page",
          search: '?query=abc',
          state: { isActive: true }
  }}&gt;Go to Home&lt;/Link&gt;
  </code></pre>
  
  <p>Also when I use history.push state is updating correctly bu using below code:-</p>
  
  <pre><code>history.push({
                 pathname: '/template',
                 search: '?query=abc', 
                 state: {
                  isActive: true
                 }
  });
  </code></pre>
  
  <p>However when I am using history.replace in javascript I am not able to update the state. I am trying the below code however its not working.</p>
  
  <pre><code>history.replace({ pathname: 'home', search: '?query=abc', isActive: true});
  </code></pre>
  
  <p>Anyone knows what I am doing wrong? Why my state is not updating while redirecting with <code>history.replace</code></p>