title: Passing state via this.history.pushState()
body: <p>I'm using react-router 1.0 and their integration of history.</p>
  
  <pre class="lang-jsx prettyprint-override"><code>import { createHistory, useBasename } from 'history'
  
  const history = useBasename(createHistory)({
      basename: '/base-path'
  });
  
  export default (
      &lt;Router history={history}&gt;
          &lt;Route path="/" component={require("Template")}&gt;
              &lt;Route path="sub-page" component={require("SubPage")}/&gt;
          &lt;/Route&gt;
      &lt;/Router&gt;
  );
  </code></pre>
  
  <p>I'm attempting to remove IDs from our API and in the URL and pass the self link create by <a href="https://spring.io/understanding/HATEOAS" rel="noreferrer">HATEOAS</a> in a JSON object.
  I would like to pass the data via the pushState state parameter.</p>
  
  <pre class="lang-js prettyprint-override"><code>onClickEditButton(selfLinkObject) {
      this.history.pushState(selfLinkObject, "/my/url");
  }
  </code></pre>
  
  <p>But when I attempt to get the state it's not being passed.</p>
  
  <pre class="lang-jsx prettyprint-override"><code>import React from "react"
  import { History } from "react-router"
  
  export default React.createClass({
      mixins: [History],
      componentDidMount() {
          console.log(this.state);
          console.log(this.history.state);
          console.log(history.state);
      },
      render() {
          &lt;p&gt;Check the console to see if the state is passed from the pushState(state, url, params);&lt;/p&gt;
      }
  });
  </code></pre>
  
  <p>It seems this is the way pushState was intended to work according to <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API#The_pushState%28%29_method" rel="noreferrer">Mozilla's pushState documentation</a> because the browser  saves state objects to the user's disk so they can be restored after the user restarts the browser.</p>
  
  <p>Does any one know how or if I can pass data to the state or if there's a better way to do this?</p>