title: How to redirect with react-router and send a message
body: <p>I'm looking for a way in React to redirect after a successful login with success message. After the login, another component should show a success message, so how do I inform it that the redirect was after successful login? I once did that with flash messages, but that solution did not use react-router and had full page refreshes. </p>
  
  <p>I am now using react-router, and am curious whether there is a react-router way to pass state/message to another route when redirecting? I am redirecting with:</p>
  
  <p><code>browserHistory.push('/')</code></p>
  
  <p>so I've tried:</p>
  
  <pre><code>browserHistory.push({
      pathname: '/',
      state: {
          message: "my message"
      }
  });
  </code></pre>
  
  <p>But target component's <code>this.state</code> remained null. Is there a way to achieve what I want using react-router's own API? Or maybe I'm trying to solve this problem incorrectly?</p>