{"action":"created","comment":{"url":"https://api.github.com/repos/BinaryMuse/fluxxor/pulls/comments/41828457","id":41828457,"diff_hunk":"@@ -16,7 +17,7 @@ var Recipe = React.createClass({\n   },\n \n   getStateFromFlux: function() {\n-    var params = this.context.router.getCurrentParams();\n+    var params = this.props.params;","path":"examples/react-router/app/components/recipe.jsx","position":24,"original_position":24,"commit_id":"5a0fa5e3d0de0921626e80942c7267f406da2201","original_commit_id":"5a0fa5e3d0de0921626e80942c7267f406da2201","user":{"login":"vishaltelangre","id":876195,"avatar_url":"https://avatars.githubusercontent.com/u/876195?v=3","gravatar_id":"","url":"https://api.github.com/users/vishaltelangre","html_url":"https://github.com/vishaltelangre","followers_url":"https://api.github.com/users/vishaltelangre/followers","following_url":"https://api.github.com/users/vishaltelangre/following{/other_user}","gists_url":"https://api.github.com/users/vishaltelangre/gists{/gist_id}","starred_url":"https://api.github.com/users/vishaltelangre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishaltelangre/subscriptions","organizations_url":"https://api.github.com/users/vishaltelangre/orgs","repos_url":"https://api.github.com/users/vishaltelangre/repos","events_url":"https://api.github.com/users/vishaltelangre/events{/privacy}","received_events_url":"https://api.github.com/users/vishaltelangre/received_events","type":"User","site_admin":false},"body":"I needed to use `nextProps` (instead of `this.props`) received by `componentWillReceiveProps` to get the latest params.\r\n\r\nHere's how:\r\n\r\n```javascript\r\ngetStateFromFlux: function(newProps) {\r\n  var props = nextProps || this.props;\r\n  var params = props.params;\r\n // ...\r\n},\r\n\r\ncomponentWillReceiveProps: function(nextProps) {\r\n  this.setState(this.getStateFromFlux(nextProps));\r\n}\r\n```","created_at":"2015-10-13T05:32:41Z","updated_at":"2015-10-13T05:32:41Z","html_url":"https://github.com/BinaryMuse/fluxxor/pull/142#discussion_r41828457","pull_request_url":"https://api.github.com/repos/BinaryMuse/fluxxor/pulls/142","_links":{"self":{"href":"https://api.github.com/repos/BinaryMuse/fluxxor/pulls/comments/41828457"},"html":{"href":"https://github.com/BinaryMuse/fluxxor/pull/142#discussion_r41828457"},"pull_request":{"href":"https://api.github.com/repos/BinaryMuse/fluxxor/pulls/142"}}},"pull_request":{"url":"https://api.github.com/repos/BinaryMuse/fluxxor/pulls/142","id":45707797,"html_url":"https://github.com/BinaryMuse/fluxxor/pull/142","diff_url":"https://github.com/BinaryMuse/fluxxor/pull/142.diff","patch_url":"https://github.com/BinaryMuse/fluxxor/pull/142.patch","issue_url":"https://api.github.com/repos/BinaryMuse/fluxxor/issues/142","number":142,"state":"open","locked":false,"title":"Upgrade examples/react-router to use react-router 1.0-rc1","user":{"login":"andrewslater","id":3157172,"avatar_url":"https://avatars.githubusercontent.com/u/3157172?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewslater","html_url":"https://github.com/andrewslater","followers_url":"https://api.github.com/users/andrewslater/followers","following_url":"https://api.github.com/users/andrewslater/following{/other_user}","gists_url":"https://api.github.com/users/andrewslater/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewslater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewslater/subscriptions","organizations_url":"https://api.github.com/users/andrewslater/orgs","repos_url":"https://api.github.com/users/andrewslater/repos","events_url":"https://api.github.com/users/andrewslater/events{/privacy}","received_events_url":"https://api.github.com/users/andrewslater/received_events","type":"User","site_admin":false},"body":"Upgrades the react-router example to use react-router 1.0-rc1\r\n\r\nWas trying to reproduce the issue I'm seeing as documented in https://github.com/BinaryMuse/fluxxor/issues/141 however even after upgrading to react-router 1.0-rc1 I am not able to reproduce the issue where I see \r\n\r\n```\r\nWarning: owner-based and parent-based contexts differ (values: `undefined` vs `[object Object]`) for key (flux) while mounting module.exports (see: http://fb.me/react-context-by-parent)\r\n```\r\n\r\nwhen injecting fluxxor into my router components in another app I'm working on. Nevertheless this code to migrate to react-router 1.0-rc1 may be useful to the Fluxxor project.","created_at":"2015-09-22T19:45:45Z","updated_at":"2015-10-13T05:32:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b4e5a43bcfe5711f633eacfc3fb3418c9778324","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BinaryMuse/fluxxor/pulls/142/commits","review_comments_url":"https://api.github.com/repos/BinaryMuse/fluxxor/pulls/142/comments","review_comment_url":"https://api.github.com/repos/BinaryMuse/fluxxor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BinaryMuse/fluxxor/issues/142/comments","statuses_url":"https://api.github.com/repos/BinaryMuse/fluxxor/statuses/5a0fa5e3d0de0921626e80942c7267f406da2201","head":{"label":"andrewslater:react-router-1.0","ref":"react-router-1.0","sha":"5a0fa5e3d0de0921626e80942c7267f406da2201","user":{"login":"andrewslater","id":3157172,"avatar_url":"https://avatars.githubusercontent.com/u/3157172?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewslater","html_url":"https://github.com/andrewslater","followers_url":"https://api.github.com/users/andrewslater/followers","following_url":"https://api.github.com/users/andrewslater/following{/other_user}","gists_url":"https://api.github.com/users/andrewslater/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewslater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewslater/subscriptions","organizations_url":"https://api.github.com/users/andrewslater/orgs","repos_url":"https://api.github.com/users/andrewslater/repos","events_url":"https://api.github.com/users/andrewslater/events{/privacy}","received_events_url":"https://api.github.com/users/andrewslater/received_events","type":"User","site_admin":false},"repo":{"id":42956573,"name":"fluxxor","full_name":"andrewslater/fluxxor","owner":{"login":"andrewslater","id":3157172,"avatar_url":"https://avatars.githubusercontent.com/u/3157172?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewslater","html_url":"https://github.com/andrewslater","followers_url":"https://api.github.com/users/andrewslater/followers","following_url":"https://api.github.com/users/andrewslater/following{/other_user}","gists_url":"https://api.github.com/users/andrewslater/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewslater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewslater/subscriptions","organizations_url":"https://api.github.com/users/andrewslater/orgs","repos_url":"https://api.github.com/users/andrewslater/repos","events_url":"https://api.github.com/users/andrewslater/events{/privacy}","received_events_url":"https://api.github.com/users/andrewslater/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrewslater/fluxxor","description":"Flux architecture tools for React","fork":true,"url":"https://api.github.com/repos/andrewslater/fluxxor","forks_url":"https://api.github.com/repos/andrewslater/fluxxor/forks","keys_url":"https://api.github.com/repos/andrewslater/fluxxor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrewslater/fluxxor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrewslater/fluxxor/teams","hooks_url":"https://api.github.com/repos/andrewslater/fluxxor/hooks","issue_events_url":"https://api.github.com/repos/andrewslater/fluxxor/issues/events{/number}","events_url":"https://api.github.com/repos/andrewslater/fluxxor/events","assignees_url":"https://api.github.com/repos/andrewslater/fluxxor/assignees{/user}","branches_url":"https://api.github.com/repos/andrewslater/fluxxor/branches{/branch}","tags_url":"https://api.github.com/repos/andrewslater/fluxxor/tags","blobs_url":"https://api.github.com/repos/andrewslater/fluxxor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrewslater/fluxxor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrewslater/fluxxor/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrewslater/fluxxor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrewslater/fluxxor/statuses/{sha}","languages_url":"https://api.github.com/repos/andrewslater/fluxxor/languages","stargazers_url":"https://api.github.com/repos/andrewslater/fluxxor/stargazers","contributors_url":"https://api.github.com/repos/andrewslater/fluxxor/contributors","subscribers_url":"https://api.github.com/repos/andrewslater/fluxxor/subscribers","subscription_url":"https://api.github.com/repos/andrewslater/fluxxor/subscription","commits_url":"https://api.github.com/repos/andrewslater/fluxxor/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrewslater/fluxxor/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrewslater/fluxxor/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrewslater/fluxxor/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrewslater/fluxxor/contents/{+path}","compare_url":"https://api.github.com/repos/andrewslater/fluxxor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrewslater/fluxxor/merges","archive_url":"https://api.github.com/repos/andrewslater/fluxxor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrewslater/fluxxor/downloads","issues_url":"https://api.github.com/repos/andrewslater/fluxxor/issues{/number}","pulls_url":"https://api.github.com/repos/andrewslater/fluxxor/pulls{/number}","milestones_url":"https://api.github.com/repos/andrewslater/fluxxor/milestones{/number}","notifications_url":"https://api.github.com/repos/andrewslater/fluxxor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrewslater/fluxxor/labels{/name}","releases_url":"https://api.github.com/repos/andrewslater/fluxxor/releases{/id}","created_at":"2015-09-22T19:40:05Z","updated_at":"2015-09-22T19:40:08Z","pushed_at":"2015-09-22T21:25:57Z","git_url":"git://github.com/andrewslater/fluxxor.git","ssh_url":"git@github.com:andrewslater/fluxxor.git","clone_url":"https://github.com/andrewslater/fluxxor.git","svn_url":"https://github.com/andrewslater/fluxxor","homepage":"http://fluxxor.com/","size":16048,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"BinaryMuse:master","ref":"master","sha":"aad8778ad40681dabc7273761269e8d1058540c6","user":{"login":"BinaryMuse","id":189606,"avatar_url":"https://avatars.githubusercontent.com/u/189606?v=3","gravatar_id":"","url":"https://api.github.com/users/BinaryMuse","html_url":"https://github.com/BinaryMuse","followers_url":"https://api.github.com/users/BinaryMuse/followers","following_url":"https://api.github.com/users/BinaryMuse/following{/other_user}","gists_url":"https://api.github.com/users/BinaryMuse/gists{/gist_id}","starred_url":"https://api.github.com/users/BinaryMuse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BinaryMuse/subscriptions","organizations_url":"https://api.github.com/users/BinaryMuse/orgs","repos_url":"https://api.github.com/users/BinaryMuse/repos","events_url":"https://api.github.com/users/BinaryMuse/events{/privacy}","received_events_url":"https://api.github.com/users/BinaryMuse/received_events","type":"User","site_admin":false},"repo":{"id":19680412,"name":"fluxxor","full_name":"BinaryMuse/fluxxor","owner":{"login":"BinaryMuse","id":189606,"avatar_url":"https://avatars.githubusercontent.com/u/189606?v=3","gravatar_id":"","url":"https://api.github.com/users/BinaryMuse","html_url":"https://github.com/BinaryMuse","followers_url":"https://api.github.com/users/BinaryMuse/followers","following_url":"https://api.github.com/users/BinaryMuse/following{/other_user}","gists_url":"https://api.github.com/users/BinaryMuse/gists{/gist_id}","starred_url":"https://api.github.com/users/BinaryMuse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BinaryMuse/subscriptions","organizations_url":"https://api.github.com/users/BinaryMuse/orgs","repos_url":"https://api.github.com/users/BinaryMuse/repos","events_url":"https://api.github.com/users/BinaryMuse/events{/privacy}","received_events_url":"https://api.github.com/users/BinaryMuse/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BinaryMuse/fluxxor","description":"Flux architecture tools for React","fork":false,"url":"https://api.github.com/repos/BinaryMuse/fluxxor","forks_url":"https://api.github.com/repos/BinaryMuse/fluxxor/forks","keys_url":"https://api.github.com/repos/BinaryMuse/fluxxor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BinaryMuse/fluxxor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BinaryMuse/fluxxor/teams","hooks_url":"https://api.github.com/repos/BinaryMuse/fluxxor/hooks","issue_events_url":"https://api.github.com/repos/BinaryMuse/fluxxor/issues/events{/number}","events_url":"https://api.github.com/repos/BinaryMuse/fluxxor/events","assignees_url":"https://api.github.com/repos/BinaryMuse/fluxxor/assignees{/user}","branches_url":"https://api.github.com/repos/BinaryMuse/fluxxor/branches{/branch}","tags_url":"https://api.github.com/repos/BinaryMuse/fluxxor/tags","blobs_url":"https://api.github.com/repos/BinaryMuse/fluxxor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BinaryMuse/fluxxor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BinaryMuse/fluxxor/git/refs{/sha}","trees_url":"https://api.github.com/repos/BinaryMuse/fluxxor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BinaryMuse/fluxxor/statuses/{sha}","languages_url":"https://api.github.com/repos/BinaryMuse/fluxxor/languages","stargazers_url":"https://api.github.com/repos/BinaryMuse/fluxxor/stargazers","contributors_url":"https://api.github.com/repos/BinaryMuse/fluxxor/contributors","subscribers_url":"https://api.github.com/repos/BinaryMuse/fluxxor/subscribers","subscription_url":"https://api.github.com/repos/BinaryMuse/fluxxor/subscription","commits_url":"https://api.github.com/repos/BinaryMuse/fluxxor/commits{/sha}","git_commits_url":"https://api.github.com/repos/BinaryMuse/fluxxor/git/commits{/sha}","comments_url":"https://api.github.com/repos/BinaryMuse/fluxxor/comments{/number}","issue_comment_url":"https://api.github.com/repos/BinaryMuse/fluxxor/issues/comments{/number}","contents_url":"https://api.github.com/repos/BinaryMuse/fluxxor/contents/{+path}","compare_url":"https://api.github.com/repos/BinaryMuse/fluxxor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BinaryMuse/fluxxor/merges","archive_url":"https://api.github.com/repos/BinaryMuse/fluxxor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BinaryMuse/fluxxor/downloads","issues_url":"https://api.github.com/repos/BinaryMuse/fluxxor/issues{/number}","pulls_url":"https://api.github.com/repos/BinaryMuse/fluxxor/pulls{/number}","milestones_url":"https://api.github.com/repos/BinaryMuse/fluxxor/milestones{/number}","notifications_url":"https://api.github.com/repos/BinaryMuse/fluxxor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BinaryMuse/fluxxor/labels{/name}","releases_url":"https://api.github.com/repos/BinaryMuse/fluxxor/releases{/id}","created_at":"2014-05-11T23:44:47Z","updated_at":"2015-10-12T10:28:17Z","pushed_at":"2015-09-22T21:25:58Z","git_url":"git://github.com/BinaryMuse/fluxxor.git","ssh_url":"git@github.com:BinaryMuse/fluxxor.git","clone_url":"https://github.com/BinaryMuse/fluxxor.git","svn_url":"https://github.com/BinaryMuse/fluxxor","homepage":"http://fluxxor.com/","size":17680,"stargazers_count":1495,"watchers_count":1495,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":113,"mirror_url":null,"open_issues_count":28,"forks":113,"open_issues":28,"watchers":1495,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BinaryMuse/fluxxor/pulls/142"},"html":{"href":"https://github.com/BinaryMuse/fluxxor/pull/142"},"issue":{"href":"https://api.github.com/repos/BinaryMuse/fluxxor/issues/142"},"comments":{"href":"https://api.github.com/repos/BinaryMuse/fluxxor/issues/142/comments"},"review_comments":{"href":"https://api.github.com/repos/BinaryMuse/fluxxor/pulls/142/comments"},"review_comment":{"href":"https://api.github.com/repos/BinaryMuse/fluxxor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BinaryMuse/fluxxor/pulls/142/commits"},"statuses":{"href":"https://api.github.com/repos/BinaryMuse/fluxxor/statuses/5a0fa5e3d0de0921626e80942c7267f406da2201"}}}}