React router Link or browserHistory.push change url in the address bar but don't redirect from the page with dynamic params in it's url
<p>I have the sidebar with react-router Links in it. Purpose of one of the buttons is to redirect logged in user to his profile page with url like /user/:user_id</p>

<p>I defined some logic for that link and it works perfectly without any problems in almost all cases. Here's how it looks like:</p>

<pre><code>export class SideBar extends React.Component {
    // ... some omitted code here ...
    getProfileUrlString() {
        /* Function for 'to' attribute of profile Link button in the sidebar.
         * Returns user's profile URL if he's logged in,
         * otherwise redirects him to the /login page
         */
        if (localStorage['token']) {
            return `/user/${localStorage['id']}/`
        } else {
            return '/login'
        }
    }

    render() {
        return (
        &lt;div id="sidebar-wrapper" role="navigation"&gt;
            &lt;ul className="sidebar-nav"&gt;
                &lt;li&gt;&lt;Link onlyActiveOnIndex activeStyle={{color: "#53acff"}} 
                    to="/"&gt;Home&lt;/Link&gt;&lt;/li&gt;
                &lt;li&gt;&lt;Link onlyActiveOnIndex activeStyle={{color: "#53acff"}} 
                    to={this.getProfileUrlString()}&gt;Profile&lt;/Link&gt;&lt;/li&gt;
                {this.renderSignOutBtn()}
            &lt;/ul&gt;
        &lt;/div&gt;
      );
    }
}
</code></pre>

<p>It is my router:</p>

<pre><code>ReactDOM.render(
  (&lt;Router history = {browserHistory}&gt;
      &lt;Route path = "/" component = {APP}&gt;
         &lt;IndexRoute component = {Home} /&gt;
         &lt;Route path = "home" component = {Home}/&gt;
         &lt;Route path = "/login" component = {LoginComponent} /&gt;
         &lt;Route path = "/registration" component = {RegistrationComponent} /&gt;
         &lt;Route path = "/user/:user_id" component = {Profile} /&gt;
      &lt;/Route&gt;
  &lt;/Router&gt;),
  document.getElementById('app'));
</code></pre>

<p>Let's say I have an account and id is 102 so mine profile page is available at <code>/user/102</code> </p>

<p>When I visit non-dynamic urls like '/' or '/login' and then click on the Profile Link in the navbar it works perfectly! It successfully redirects me to my profile. But when I visit page of some other user with url like /user/5 and click on Profile link to get back nothing happens! Except one strange thing: url in the address bar changes from /user/5 to /user/102. But profile's component doesn't rerender and all data of user number 5 is in front of me. </p>

<p>I tried to redefine some logic for onClick event and to assign browserHistory.push redirections but there is the same problem too. I tried this.history.push too with the same result.</p>

<p>How can I redirect to the page with dynamic ids in it's url from similar page with similar dynamic params?</p>

<p>React: 15.3.2</p>

<p>react-router: 2.8.1</p>