title: React Router v4 replace history when component is unmounted
body: <p>I have a app which has the Following Components </p>
  
  <blockquote>
    <p>|__Base   -  /home/Base</p>
    
    <p>|__Try   - /home/Base/:try</p>
    
    <p>|__Report   - /home/Base/:try/report</p>
  </blockquote>
  
  <p>Base is the Starting screen where the user hits a button and clicks on Try and after trying some things he hits submits which generates reports which has some back end interactions and when the data is fetched it loads the Reports. </p>
  
  <p>So what i want is when the user hits the back button from the Reports Page he should not land on the Try page but on the Base page .</p>
  
  <p>For that to work i went through the react router documentation and was trying to use <code>history.replace</code> on <code>componentWillUnmount</code> for Reports Page</p>
  
  <pre><code>this.props.history.replace(`/home/Base`, {
    pathname: `/home/Base`,
    search: null,
    state: {
      isActive: true
    }
  }, null);
  </code></pre>
  
  <p>In case the Report Page is FullyLoaded and i press the back button it works but calls the Try Render Method too and then takes me to the Base Page , But in case of Reports Not fully Loaded and i press the back button while the loading spinner is in progress it goes to base page still but also mounts and unmounts the TRY component.</p>
  
  <blockquote>
    <p>What am i missing here , what causes it to mount/unmount or render the previous component and then load the base component even though i replace the history stack ?</p>
  </blockquote>