title: react router onChange
body: <p>How to pass new props when route changed? 
  I need change class depends on route. </p>
  
  <pre><code>export class Routes extends React.Component&lt;any, any&gt; {
  constructor(props:any){
      super(props);
  }
  handleChange = (prevState, nextState, replaceState) =&gt; {
      console.log(nextState.location.pathname);
  };
  render(){
      return(
          &lt;Router {...this.props}&gt;
              &lt;Route  path="/" onChange={this.handleChange} component={Miramir}&gt;
                  &lt;Route  path="/about"&gt;
                      &lt;IndexRoute component={Miramir}&gt;&lt;/IndexRoute&gt;
                  &lt;/Route&gt;
                  &lt;Route  path="/contact"&gt;
                      &lt;IndexRoute component={Miramir}&gt;&lt;/IndexRoute&gt;
                  &lt;/Route&gt;
                  &lt;Route path="/profile"&gt;
                      &lt;IndexRoute component={Profile} /&gt;
                      &lt;Route path="/profile/update" component={ProfileUpdate} /&gt;
                      &lt;Route path="/profile/login" component={LogInPage} /&gt;
                  &lt;/Route&gt;
              &lt;/Route&gt;
          &lt;/Router&gt;
      )
    }
  }
  </code></pre>
  
  <p>I'm trying to get props in my Miramir component and check <code>location.pathname</code> </p>
  
  <p>For example: On my route / i want header class <code>home-page</code> and on /profile route want <code>profile-page</code> class. 
  But when i change routes <code>location.pathname</code> has <code>/</code> route </p>
  
  <p>How to check update props? </p>
  
  <p>I need <code>nextState.location.pathname</code> in my Miramir component</p>