{"action":"created","comment":{"url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/pulls/comments/85876499","pull_request_review_id":6564556,"id":85876499,"diff_hunk":"@@ -0,0 +1,58 @@\n+import React, { PropTypes } from 'react';\n+import HelloWorldWidget from '../components/HelloWorldWidget';\n+import { connect } from 'react-redux';\n+import Immutable from 'immutable';\n+import * as actions from '../actions/helloWorldActionCreators';\n+\n+function mapStateToProps(state) {\n+  // Which part of the Redux global state does our component want to receive as props?\n+  // Note the use of `$$` to prefix the property name because the value is of type Immutable.js\n+  const { otherState, ...selectedStates } = state\n+  // Revision 161029:\n+  // specify states to exclude instead of states to include\n+  return selectedStates;\n+}\n+\n+// Simple example of a React \"smart\" component\n+const HelloWorld = (props) => {\n+  const { $$person, updateName } = props;\n+  // Revision 161029:\n+  // Shouldn't use bindActionCreators like this. Because with this\n+  // each time this HelloWorld component needs to be rendered\n+  // bindActionCreators is called, returning a set of functions with the same\n+  // code but different refenrences. So this will result in unexpected results\n+  // of shouldComponentUpdate when people later use PureComponent or\n+  // PureRenderMixin. When they expect the component not to update, it updates\n+  // because those dispatch functions passed from here are with diffrent\n+  // references. BTW, we can just pass a plain object of actions as the second\n+  // argument of connect(), connect() will bind for you\n+\n+  const name = $$person.get('name');\n+\n+  // This uses the ES2015 spread operator to pass properties as it is more DRY\n+  // This is equivalent to:\n+  // <HelloWorldWidget $$helloWorldStore={$$helloWorldStore} actions={actions} />\n+  return (\n+    <HelloWorldWidget {...{ updateName, name }} />\n+  );\n+};\n+\n+HelloWorld.propTypes = {\n+  // Revision 161029:\n+  // as actions are passed as the second argument of connect(), connect() will\n+  // bind actions for us and won't pass dispatch to props. also we shouldn't // need dispatch anyway as actions are already bound\n+\n+  // This corresponds to the value used in function select above.\n+  // We prefix all property and variable names pointing to Immutable.js objects with '$$'.\n+  // This allows us to immediately know we don't call $$helloWorldStore['someProperty'], but\n+  // instead use the Immutable.js `get` API for Immutable.Map\n+  $$person: PropTypes.instanceOf(Immutable.Map).isRequired,\n+};\n+\n+// Don't forget to actually use connect!\n+// Note that we don't export HelloWorld, but the redux \"connected\" version of it.\n+// See https://github.com/reactjs/react-redux/blob/master/docs/api.md#examples\n+// if you don't want to pass all the actions, do something like:\n+// const {updateName, ...selectedActions} = actions;\n+// export default connect(select, selectedActions)(HelloWorld);\n+export default connect(mapStateToProps, actions)(HelloWorld);","path":"client/app/bundles/HelloWorld/containers/HelloWorld.jsx","position":58,"original_position":58,"commit_id":"100a92a0d9e564ddf717e7a261f01748627177c9","original_commit_id":"100a92a0d9e564ddf717e7a261f01748627177c9","user":{"login":"justin808","id":1118459,"avatar_url":"https://avatars.githubusercontent.com/u/1118459?v=3","gravatar_id":"","url":"https://api.github.com/users/justin808","html_url":"https://github.com/justin808","followers_url":"https://api.github.com/users/justin808/followers","following_url":"https://api.github.com/users/justin808/following{/other_user}","gists_url":"https://api.github.com/users/justin808/gists{/gist_id}","starred_url":"https://api.github.com/users/justin808/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justin808/subscriptions","organizations_url":"https://api.github.com/users/justin808/orgs","repos_url":"https://api.github.com/users/justin808/repos","events_url":"https://api.github.com/users/justin808/events{/privacy}","received_events_url":"https://api.github.com/users/justin808/received_events","type":"User","site_admin":false},"body":"@nostophilia I agree with this. ","created_at":"2016-11-01T05:16:21Z","updated_at":"2016-11-01T05:16:22Z","html_url":"https://github.com/shakacode/react_on_rails-test-new-redux-generation/pull/1#discussion_r85876499","pull_request_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/pulls/comments/85876499"},"html":{"href":"https://github.com/shakacode/react_on_rails-test-new-redux-generation/pull/1#discussion_r85876499"},"pull_request":{"href":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/pulls/1","id":91543005,"html_url":"https://github.com/shakacode/react_on_rails-test-new-redux-generation/pull/1","diff_url":"https://github.com/shakacode/react_on_rails-test-new-redux-generation/pull/1.diff","patch_url":"https://github.com/shakacode/react_on_rails-test-new-redux-generation/pull/1.patch","issue_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/issues/1","number":1,"state":"open","locked":false,"title":"After running generate with redux, local install","user":{"login":"justin808","id":1118459,"avatar_url":"https://avatars.githubusercontent.com/u/1118459?v=3","gravatar_id":"","url":"https://api.github.com/users/justin808","html_url":"https://github.com/justin808","followers_url":"https://api.github.com/users/justin808/followers","following_url":"https://api.github.com/users/justin808/following{/other_user}","gists_url":"https://api.github.com/users/justin808/gists{/gist_id}","starred_url":"https://api.github.com/users/justin808/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justin808/subscriptions","organizations_url":"https://api.github.com/users/justin808/orgs","repos_url":"https://api.github.com/users/justin808/repos","events_url":"https://api.github.com/users/justin808/events{/privacy}","received_events_url":"https://api.github.com/users/justin808/received_events","type":"User","site_admin":false},"body":"rails generate react_on_rails:install --redux\n","created_at":"2016-10-31T00:13:52Z","updated_at":"2016-11-01T05:16:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"442520bd69569a187e458b2d9321541b0fe04d44","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/pulls/1/commits","review_comments_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/pulls/1/comments","review_comment_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/issues/1/comments","statuses_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/statuses/100a92a0d9e564ddf717e7a261f01748627177c9","head":{"label":"shakacode:run-generator-redux-updated","ref":"run-generator-redux-updated","sha":"100a92a0d9e564ddf717e7a261f01748627177c9","user":{"login":"shakacode","id":13779463,"avatar_url":"https://avatars.githubusercontent.com/u/13779463?v=3","gravatar_id":"","url":"https://api.github.com/users/shakacode","html_url":"https://github.com/shakacode","followers_url":"https://api.github.com/users/shakacode/followers","following_url":"https://api.github.com/users/shakacode/following{/other_user}","gists_url":"https://api.github.com/users/shakacode/gists{/gist_id}","starred_url":"https://api.github.com/users/shakacode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shakacode/subscriptions","organizations_url":"https://api.github.com/users/shakacode/orgs","repos_url":"https://api.github.com/users/shakacode/repos","events_url":"https://api.github.com/users/shakacode/events{/privacy}","received_events_url":"https://api.github.com/users/shakacode/received_events","type":"Organization","site_admin":false},"repo":{"id":72383568,"name":"react_on_rails-test-new-redux-generation","full_name":"shakacode/react_on_rails-test-new-redux-generation","owner":{"login":"shakacode","id":13779463,"avatar_url":"https://avatars.githubusercontent.com/u/13779463?v=3","gravatar_id":"","url":"https://api.github.com/users/shakacode","html_url":"https://github.com/shakacode","followers_url":"https://api.github.com/users/shakacode/followers","following_url":"https://api.github.com/users/shakacode/following{/other_user}","gists_url":"https://api.github.com/users/shakacode/gists{/gist_id}","starred_url":"https://api.github.com/users/shakacode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shakacode/subscriptions","organizations_url":"https://api.github.com/users/shakacode/orgs","repos_url":"https://api.github.com/users/shakacode/repos","events_url":"https://api.github.com/users/shakacode/events{/privacy}","received_events_url":"https://api.github.com/users/shakacode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shakacode/react_on_rails-test-new-redux-generation","description":"Testing out a different redux generation. See https://github.com/shakacode/react_on_rails/pull/584","fork":false,"url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation","forks_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/forks","keys_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/teams","hooks_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/hooks","issue_events_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/issues/events{/number}","events_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/events","assignees_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/assignees{/user}","branches_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/branches{/branch}","tags_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/tags","blobs_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/git/refs{/sha}","trees_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/statuses/{sha}","languages_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/languages","stargazers_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/stargazers","contributors_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/contributors","subscribers_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/subscribers","subscription_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/subscription","commits_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/commits{/sha}","git_commits_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/git/commits{/sha}","comments_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/comments{/number}","issue_comment_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/issues/comments{/number}","contents_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/contents/{+path}","compare_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/merges","archive_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/downloads","issues_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/issues{/number}","pulls_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/pulls{/number}","milestones_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/milestones{/number}","notifications_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/labels{/name}","releases_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/releases{/id}","deployments_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/deployments","created_at":"2016-10-31T00:10:30Z","updated_at":"2016-10-31T00:10:54Z","pushed_at":"2016-11-01T04:30:51Z","git_url":"git://github.com/shakacode/react_on_rails-test-new-redux-generation.git","ssh_url":"git@github.com:shakacode/react_on_rails-test-new-redux-generation.git","clone_url":"https://github.com/shakacode/react_on_rails-test-new-redux-generation.git","svn_url":"https://github.com/shakacode/react_on_rails-test-new-redux-generation","homepage":null,"size":34,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"shakacode:master","ref":"master","sha":"31ad3bd995817f4440c1a5d9a3f0ff4f494c1481","user":{"login":"shakacode","id":13779463,"avatar_url":"https://avatars.githubusercontent.com/u/13779463?v=3","gravatar_id":"","url":"https://api.github.com/users/shakacode","html_url":"https://github.com/shakacode","followers_url":"https://api.github.com/users/shakacode/followers","following_url":"https://api.github.com/users/shakacode/following{/other_user}","gists_url":"https://api.github.com/users/shakacode/gists{/gist_id}","starred_url":"https://api.github.com/users/shakacode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shakacode/subscriptions","organizations_url":"https://api.github.com/users/shakacode/orgs","repos_url":"https://api.github.com/users/shakacode/repos","events_url":"https://api.github.com/users/shakacode/events{/privacy}","received_events_url":"https://api.github.com/users/shakacode/received_events","type":"Organization","site_admin":false},"repo":{"id":72383568,"name":"react_on_rails-test-new-redux-generation","full_name":"shakacode/react_on_rails-test-new-redux-generation","owner":{"login":"shakacode","id":13779463,"avatar_url":"https://avatars.githubusercontent.com/u/13779463?v=3","gravatar_id":"","url":"https://api.github.com/users/shakacode","html_url":"https://github.com/shakacode","followers_url":"https://api.github.com/users/shakacode/followers","following_url":"https://api.github.com/users/shakacode/following{/other_user}","gists_url":"https://api.github.com/users/shakacode/gists{/gist_id}","starred_url":"https://api.github.com/users/shakacode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shakacode/subscriptions","organizations_url":"https://api.github.com/users/shakacode/orgs","repos_url":"https://api.github.com/users/shakacode/repos","events_url":"https://api.github.com/users/shakacode/events{/privacy}","received_events_url":"https://api.github.com/users/shakacode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shakacode/react_on_rails-test-new-redux-generation","description":"Testing out a different redux generation. See https://github.com/shakacode/react_on_rails/pull/584","fork":false,"url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation","forks_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/forks","keys_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/teams","hooks_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/hooks","issue_events_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/issues/events{/number}","events_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/events","assignees_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/assignees{/user}","branches_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/branches{/branch}","tags_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/tags","blobs_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/git/refs{/sha}","trees_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/statuses/{sha}","languages_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/languages","stargazers_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/stargazers","contributors_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/contributors","subscribers_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/subscribers","subscription_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/subscription","commits_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/commits{/sha}","git_commits_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/git/commits{/sha}","comments_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/comments{/number}","issue_comment_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/issues/comments{/number}","contents_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/contents/{+path}","compare_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/merges","archive_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/downloads","issues_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/issues{/number}","pulls_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/pulls{/number}","milestones_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/milestones{/number}","notifications_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/labels{/name}","releases_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/releases{/id}","deployments_url":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/deployments","created_at":"2016-10-31T00:10:30Z","updated_at":"2016-10-31T00:10:54Z","pushed_at":"2016-11-01T04:30:51Z","git_url":"git://github.com/shakacode/react_on_rails-test-new-redux-generation.git","ssh_url":"git@github.com:shakacode/react_on_rails-test-new-redux-generation.git","clone_url":"https://github.com/shakacode/react_on_rails-test-new-redux-generation.git","svn_url":"https://github.com/shakacode/react_on_rails-test-new-redux-generation","homepage":null,"size":34,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/pulls/1"},"html":{"href":"https://github.com/shakacode/react_on_rails-test-new-redux-generation/pull/1"},"issue":{"href":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/issues/1"},"comments":{"href":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/shakacode/react_on_rails-test-new-redux-generation/statuses/100a92a0d9e564ddf717e7a261f01748627177c9"}}}}
{"actor":{"display_login":"justin808"}}