title: react-router auto-login in the onEnter hook
body: <p>In all the react-router examples for the <code>onEnter</code> hook, the hook is synchronous. In the issues it's recommended to keep it that way. What's the idiomatic way to log someone in while inside a hook?</p>
  
  <p>User-story:</p>
  
  <ol>
  <li>Client has a localStore token</li>
  <li>Client navigates directly to <code>example.com/mustBeLoggedIn</code></li>
  <li>Before going to that page, I'd like to check if they have a token, if they do, attempt to gain authorization. If authorized, continue onto route</li>
  </ol>
  
  <p>Should I just use a HOC instead of <code>onEnter</code>? </p>
  
  <p>I currently have it working, but I know it's not recommended, and seems very brittle, for example using an immutable store causes the same issues as this issue: <a href="https://github.com/rackt/react-router/issues/2365" rel="nofollow">https://github.com/rackt/react-router/issues/2365</a></p>