title: react router v3 onEnter wait for promise
body: <p>I looked everywhere before posting this question, but I couldn't find anything!!!</p>
  
  <p>So I want that some routes in my react app wait for a Promise to be resolved so I can check the users-roles if that user can access a particular route.</p>
  
  <p>I tried the code below but it doesn't work !</p>
  
  <pre><code> checkRoles = (nextState, replace) =&gt; {
  
      if(token &amp;&amp; !loggedUser) {
              this.getUserData()
              .then(() =&gt; {
                alert('you are logged in.');
                replace('/dashboard');
              })
              .catch(() =&gt; {
                alert('session expired.');
                replace('/login');
              });
            } else {
              alert('Please login first.');
              replace('frontend/login');
            }
        }
  </code></pre>
  
  <p>The replace is totally ignored in <code>catch</code> and <code>then</code> functions, I also tried passing a third arg <code>callback()</code>, it doesn't work as well!</p>