{"action":"created","issue":{"url":"https://api.github.com/repos/rackt/react-router/issues/2684","labels_url":"https://api.github.com/repos/rackt/react-router/issues/2684/labels{/name}","comments_url":"https://api.github.com/repos/rackt/react-router/issues/2684/comments","events_url":"https://api.github.com/repos/rackt/react-router/issues/2684/events","html_url":"https://github.com/rackt/react-router/issues/2684","id":121131756,"number":2684,"title":"Passing state via this.history.pushState()","user":{"login":"jmuela1015","id":16215765,"avatar_url":"https://avatars.githubusercontent.com/u/16215765?v=3","gravatar_id":"","url":"https://api.github.com/users/jmuela1015","html_url":"https://github.com/jmuela1015","followers_url":"https://api.github.com/users/jmuela1015/followers","following_url":"https://api.github.com/users/jmuela1015/following{/other_user}","gists_url":"https://api.github.com/users/jmuela1015/gists{/gist_id}","starred_url":"https://api.github.com/users/jmuela1015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmuela1015/subscriptions","organizations_url":"https://api.github.com/users/jmuela1015/orgs","repos_url":"https://api.github.com/users/jmuela1015/repos","events_url":"https://api.github.com/users/jmuela1015/events{/privacy}","received_events_url":"https://api.github.com/users/jmuela1015/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-09T00:19:21Z","updated_at":"2015-12-09T17:58:32Z","closed_at":"2015-12-09T00:26:37Z","body":"I don't know if this is done by principal or if you could add this as a feature.\r\nWe're attempting to remove IDs from our API and in the URL. So now I'm attempting to pass the self link create by [HATEOS](https://spring.io/understanding/HATEOAS) in a JSON object.\r\nI would like to pass the data via the pushState state parameter.\r\n\r\n```javascript\r\nonClickEditButton(selfLinkObject) {\r\n  this.history.pushState(selfLinkObject, \"/my/url\");\r\n}\r\n```\r\nBut when I attempt to get the state it's not being passed.\r\n\r\n```javascript\r\nimport React from \"react\"\r\nimport { History } from \"react-router\"\r\n\r\nexport default React.createClass({\r\n    mixins: [History],\r\n    componentDidMount() {\r\n        console.log(this.state);\r\n        console.log(this.history.state);\r\n        console.log(history.state);\r\n    },\r\n    render() {\r\n        <p>Check the console to see if the state is passed from the pushState(state, url, params);</p>\r\n    }\r\n});\r\n```\r\n\r\nAm I making sense or am I a complete idiot? Cause me being a complete idiot is very possible.\r\n"},"comment":{"url":"https://api.github.com/repos/rackt/react-router/issues/comments/163340564","html_url":"https://github.com/rackt/react-router/issues/2684#issuecomment-163340564","issue_url":"https://api.github.com/repos/rackt/react-router/issues/2684","id":163340564,"user":{"login":"taion","id":3112159,"avatar_url":"https://avatars.githubusercontent.com/u/3112159?v=3","gravatar_id":"","url":"https://api.github.com/users/taion","html_url":"https://github.com/taion","followers_url":"https://api.github.com/users/taion/followers","following_url":"https://api.github.com/users/taion/following{/other_user}","gists_url":"https://api.github.com/users/taion/gists{/gist_id}","starred_url":"https://api.github.com/users/taion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taion/subscriptions","organizations_url":"https://api.github.com/users/taion/orgs","repos_url":"https://api.github.com/users/taion/repos","events_url":"https://api.github.com/users/taion/events{/privacy}","received_events_url":"https://api.github.com/users/taion/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T17:58:32Z","updated_at":"2015-12-09T17:58:32Z","body":"That's a bit... much. When I said \"ask on Discord or Stack Overflow\", that's because I think those are actually better places to get help on these sorts of things. We want our users to be able to successfully use React Router, but we just believe that those sorts of problems aren't well addressed via our issues."}}