{"action":"created","comment":{"url":"https://api.github.com/repos/chungheepark/react-study/pulls/comments/65035909","id":65035909,"diff_hunk":"@@ -63,71 +63,129 @@ var MessageList = React.createClass({\n       </div>\n     );\n   }\n-});\n+}\n+MessageList.Proptypes = {\n+  data: React.PropTypes.shape({\n+    id: React.PropTypes.string.isRequired,\n+    message: React.PropTypes.string.isRequired,\n+    from: React.PropTypes.string.isRequired,\n+  })\n+};\n+\n+class Message extends React.Component {\n+  constructor(props) {\n+    super(props)\n+  }\n+  render() {\n+    var isMine = this.props.from == MY_ID;\n+    var wrapperClassName = ( isMine ) ? \"text-left\" : \"text-right\";\n+    var messageClassName = ( isMine ) ? \"label label-primary\" : \"label label-danger\";\n+\n+    return (\n+      <h3 className={ wrapperClassName }>\n+      <div key={this.props.id} className={ messageClassName }>{ this.props.message } : { this.props.from }</div>\n+      </h3>\n+    );\n+  }\n+}\n+/// ASK::Why does not work static propTypes = {} in class variable?\n+Message.Proptypes = {\n+  message:  React.PropTypes.string.isRequired,\n+  id:       React.PropTypes.string.isRequired,\n+  from:     React.PropTypes.string.isRequired,\n+}\n+\n+class MessageForm extends React.Component {\n+  constructor(props) {\n+    super(props);\n+\n+    this.state = { message: \"\", id: MessageForm.createMessageId(), from: MY_ID };\n \n-var MessageForm = React.createClass({\n-  componentDidMount: function() {\n-    setInterval(this.sendMessageOther, 5000);\n-  },\n-  getInitialState: function() {\n-    return { message: \"\", id: this.createMessageId(), from: MY_ID };\n-  },\n-  handleMessageChange: function(e) {\n-    this.setState({message: e.target.value});\n-  },\n-  createMessageId: function() {\n+    this.handleMessageChange = this.handleMessageChange.bind(this);\n+    this.handleSubmit = this.handleSubmit.bind(this);\n+  }\n+  static createMessageId() {\n     var d = new Date();\n-    var messageId = \"\";\n-    messageId += d.getFullYear();\n-    messageId += ( d.getMonth() + 1 < 10 ) ? \"0\" + (d.getMonth() + 1) : (d.getMonth() + 1);\n-    messageId += d.getDate();\n-    messageId += d.getHours();\n-    messageId += d.getMinutes();\n-    messageId += d.getSeconds();\n-    messageId += d.getMilliseconds();\n-    return messageId;\n-  },\n-  handleSubmit: function(e) {\n+    var temp = [","path":"app.js","position":170,"original_position":170,"commit_id":"3e91b16acacb528fccdecc25addd305b512b510e","original_commit_id":"3e91b16acacb528fccdecc25addd305b512b510e","user":{"login":"devhyunjae","id":12890257,"avatar_url":"https://avatars.githubusercontent.com/u/12890257?v=3","gravatar_id":"","url":"https://api.github.com/users/devhyunjae","html_url":"https://github.com/devhyunjae","followers_url":"https://api.github.com/users/devhyunjae/followers","following_url":"https://api.github.com/users/devhyunjae/following{/other_user}","gists_url":"https://api.github.com/users/devhyunjae/gists{/gist_id}","starred_url":"https://api.github.com/users/devhyunjae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devhyunjae/subscriptions","organizations_url":"https://api.github.com/users/devhyunjae/orgs","repos_url":"https://api.github.com/users/devhyunjae/repos","events_url":"https://api.github.com/users/devhyunjae/events{/privacy}","received_events_url":"https://api.github.com/users/devhyunjae/received_events","type":"User","site_admin":false},"body":"얘도 여기서 할게 아니라 manager 가 할일","created_at":"2016-05-30T07:46:58Z","updated_at":"2016-05-30T07:46:58Z","html_url":"https://github.com/chungheepark/react-study/pull/4#discussion_r65035909","pull_request_url":"https://api.github.com/repos/chungheepark/react-study/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/chungheepark/react-study/pulls/comments/65035909"},"html":{"href":"https://github.com/chungheepark/react-study/pull/4#discussion_r65035909"},"pull_request":{"href":"https://api.github.com/repos/chungheepark/react-study/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/chungheepark/react-study/pulls/4","id":71844876,"html_url":"https://github.com/chungheepark/react-study/pull/4","diff_url":"https://github.com/chungheepark/react-study/pull/4.diff","patch_url":"https://github.com/chungheepark/react-study/pull/4.patch","issue_url":"https://api.github.com/repos/chungheepark/react-study/issues/4","number":4,"state":"open","locked":false,"title":"fixes #3","user":{"login":"chungheepark","id":7334277,"avatar_url":"https://avatars.githubusercontent.com/u/7334277?v=3","gravatar_id":"","url":"https://api.github.com/users/chungheepark","html_url":"https://github.com/chungheepark","followers_url":"https://api.github.com/users/chungheepark/followers","following_url":"https://api.github.com/users/chungheepark/following{/other_user}","gists_url":"https://api.github.com/users/chungheepark/gists{/gist_id}","starred_url":"https://api.github.com/users/chungheepark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chungheepark/subscriptions","organizations_url":"https://api.github.com/users/chungheepark/orgs","repos_url":"https://api.github.com/users/chungheepark/repos","events_url":"https://api.github.com/users/chungheepark/events{/privacy}","received_events_url":"https://api.github.com/users/chungheepark/received_events","type":"User","site_admin":false},"body":"please review","created_at":"2016-05-30T01:53:10Z","updated_at":"2016-05-30T07:46:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d554c9004ff91d0cc429d443a66026fccbe1f17","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chungheepark/react-study/pulls/4/commits","review_comments_url":"https://api.github.com/repos/chungheepark/react-study/pulls/4/comments","review_comment_url":"https://api.github.com/repos/chungheepark/react-study/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chungheepark/react-study/issues/4/comments","statuses_url":"https://api.github.com/repos/chungheepark/react-study/statuses/3e91b16acacb528fccdecc25addd305b512b510e","head":{"label":"chungheepark:feature/feature-3-go-to-es6","ref":"feature/feature-3-go-to-es6","sha":"3e91b16acacb528fccdecc25addd305b512b510e","user":{"login":"chungheepark","id":7334277,"avatar_url":"https://avatars.githubusercontent.com/u/7334277?v=3","gravatar_id":"","url":"https://api.github.com/users/chungheepark","html_url":"https://github.com/chungheepark","followers_url":"https://api.github.com/users/chungheepark/followers","following_url":"https://api.github.com/users/chungheepark/following{/other_user}","gists_url":"https://api.github.com/users/chungheepark/gists{/gist_id}","starred_url":"https://api.github.com/users/chungheepark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chungheepark/subscriptions","organizations_url":"https://api.github.com/users/chungheepark/orgs","repos_url":"https://api.github.com/users/chungheepark/repos","events_url":"https://api.github.com/users/chungheepark/events{/privacy}","received_events_url":"https://api.github.com/users/chungheepark/received_events","type":"User","site_admin":false},"repo":{"id":59413811,"name":"react-study","full_name":"chungheepark/react-study","owner":{"login":"chungheepark","id":7334277,"avatar_url":"https://avatars.githubusercontent.com/u/7334277?v=3","gravatar_id":"","url":"https://api.github.com/users/chungheepark","html_url":"https://github.com/chungheepark","followers_url":"https://api.github.com/users/chungheepark/followers","following_url":"https://api.github.com/users/chungheepark/following{/other_user}","gists_url":"https://api.github.com/users/chungheepark/gists{/gist_id}","starred_url":"https://api.github.com/users/chungheepark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chungheepark/subscriptions","organizations_url":"https://api.github.com/users/chungheepark/orgs","repos_url":"https://api.github.com/users/chungheepark/repos","events_url":"https://api.github.com/users/chungheepark/events{/privacy}","received_events_url":"https://api.github.com/users/chungheepark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chungheepark/react-study","description":"Study reactJS","fork":false,"url":"https://api.github.com/repos/chungheepark/react-study","forks_url":"https://api.github.com/repos/chungheepark/react-study/forks","keys_url":"https://api.github.com/repos/chungheepark/react-study/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chungheepark/react-study/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chungheepark/react-study/teams","hooks_url":"https://api.github.com/repos/chungheepark/react-study/hooks","issue_events_url":"https://api.github.com/repos/chungheepark/react-study/issues/events{/number}","events_url":"https://api.github.com/repos/chungheepark/react-study/events","assignees_url":"https://api.github.com/repos/chungheepark/react-study/assignees{/user}","branches_url":"https://api.github.com/repos/chungheepark/react-study/branches{/branch}","tags_url":"https://api.github.com/repos/chungheepark/react-study/tags","blobs_url":"https://api.github.com/repos/chungheepark/react-study/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chungheepark/react-study/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chungheepark/react-study/git/refs{/sha}","trees_url":"https://api.github.com/repos/chungheepark/react-study/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chungheepark/react-study/statuses/{sha}","languages_url":"https://api.github.com/repos/chungheepark/react-study/languages","stargazers_url":"https://api.github.com/repos/chungheepark/react-study/stargazers","contributors_url":"https://api.github.com/repos/chungheepark/react-study/contributors","subscribers_url":"https://api.github.com/repos/chungheepark/react-study/subscribers","subscription_url":"https://api.github.com/repos/chungheepark/react-study/subscription","commits_url":"https://api.github.com/repos/chungheepark/react-study/commits{/sha}","git_commits_url":"https://api.github.com/repos/chungheepark/react-study/git/commits{/sha}","comments_url":"https://api.github.com/repos/chungheepark/react-study/comments{/number}","issue_comment_url":"https://api.github.com/repos/chungheepark/react-study/issues/comments{/number}","contents_url":"https://api.github.com/repos/chungheepark/react-study/contents/{+path}","compare_url":"https://api.github.com/repos/chungheepark/react-study/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chungheepark/react-study/merges","archive_url":"https://api.github.com/repos/chungheepark/react-study/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chungheepark/react-study/downloads","issues_url":"https://api.github.com/repos/chungheepark/react-study/issues{/number}","pulls_url":"https://api.github.com/repos/chungheepark/react-study/pulls{/number}","milestones_url":"https://api.github.com/repos/chungheepark/react-study/milestones{/number}","notifications_url":"https://api.github.com/repos/chungheepark/react-study/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chungheepark/react-study/labels{/name}","releases_url":"https://api.github.com/repos/chungheepark/react-study/releases{/id}","deployments_url":"https://api.github.com/repos/chungheepark/react-study/deployments","created_at":"2016-05-22T13:28:45Z","updated_at":"2016-05-23T06:35:54Z","pushed_at":"2016-05-30T01:53:11Z","git_url":"git://github.com/chungheepark/react-study.git","ssh_url":"git@github.com:chungheepark/react-study.git","clone_url":"https://github.com/chungheepark/react-study.git","svn_url":"https://github.com/chungheepark/react-study","homepage":null,"size":10,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"chungheepark:master","ref":"master","sha":"bec7b455495ded1e456aed30093f90844cff71f7","user":{"login":"chungheepark","id":7334277,"avatar_url":"https://avatars.githubusercontent.com/u/7334277?v=3","gravatar_id":"","url":"https://api.github.com/users/chungheepark","html_url":"https://github.com/chungheepark","followers_url":"https://api.github.com/users/chungheepark/followers","following_url":"https://api.github.com/users/chungheepark/following{/other_user}","gists_url":"https://api.github.com/users/chungheepark/gists{/gist_id}","starred_url":"https://api.github.com/users/chungheepark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chungheepark/subscriptions","organizations_url":"https://api.github.com/users/chungheepark/orgs","repos_url":"https://api.github.com/users/chungheepark/repos","events_url":"https://api.github.com/users/chungheepark/events{/privacy}","received_events_url":"https://api.github.com/users/chungheepark/received_events","type":"User","site_admin":false},"repo":{"id":59413811,"name":"react-study","full_name":"chungheepark/react-study","owner":{"login":"chungheepark","id":7334277,"avatar_url":"https://avatars.githubusercontent.com/u/7334277?v=3","gravatar_id":"","url":"https://api.github.com/users/chungheepark","html_url":"https://github.com/chungheepark","followers_url":"https://api.github.com/users/chungheepark/followers","following_url":"https://api.github.com/users/chungheepark/following{/other_user}","gists_url":"https://api.github.com/users/chungheepark/gists{/gist_id}","starred_url":"https://api.github.com/users/chungheepark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chungheepark/subscriptions","organizations_url":"https://api.github.com/users/chungheepark/orgs","repos_url":"https://api.github.com/users/chungheepark/repos","events_url":"https://api.github.com/users/chungheepark/events{/privacy}","received_events_url":"https://api.github.com/users/chungheepark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chungheepark/react-study","description":"Study reactJS","fork":false,"url":"https://api.github.com/repos/chungheepark/react-study","forks_url":"https://api.github.com/repos/chungheepark/react-study/forks","keys_url":"https://api.github.com/repos/chungheepark/react-study/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chungheepark/react-study/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chungheepark/react-study/teams","hooks_url":"https://api.github.com/repos/chungheepark/react-study/hooks","issue_events_url":"https://api.github.com/repos/chungheepark/react-study/issues/events{/number}","events_url":"https://api.github.com/repos/chungheepark/react-study/events","assignees_url":"https://api.github.com/repos/chungheepark/react-study/assignees{/user}","branches_url":"https://api.github.com/repos/chungheepark/react-study/branches{/branch}","tags_url":"https://api.github.com/repos/chungheepark/react-study/tags","blobs_url":"https://api.github.com/repos/chungheepark/react-study/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chungheepark/react-study/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chungheepark/react-study/git/refs{/sha}","trees_url":"https://api.github.com/repos/chungheepark/react-study/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chungheepark/react-study/statuses/{sha}","languages_url":"https://api.github.com/repos/chungheepark/react-study/languages","stargazers_url":"https://api.github.com/repos/chungheepark/react-study/stargazers","contributors_url":"https://api.github.com/repos/chungheepark/react-study/contributors","subscribers_url":"https://api.github.com/repos/chungheepark/react-study/subscribers","subscription_url":"https://api.github.com/repos/chungheepark/react-study/subscription","commits_url":"https://api.github.com/repos/chungheepark/react-study/commits{/sha}","git_commits_url":"https://api.github.com/repos/chungheepark/react-study/git/commits{/sha}","comments_url":"https://api.github.com/repos/chungheepark/react-study/comments{/number}","issue_comment_url":"https://api.github.com/repos/chungheepark/react-study/issues/comments{/number}","contents_url":"https://api.github.com/repos/chungheepark/react-study/contents/{+path}","compare_url":"https://api.github.com/repos/chungheepark/react-study/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chungheepark/react-study/merges","archive_url":"https://api.github.com/repos/chungheepark/react-study/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chungheepark/react-study/downloads","issues_url":"https://api.github.com/repos/chungheepark/react-study/issues{/number}","pulls_url":"https://api.github.com/repos/chungheepark/react-study/pulls{/number}","milestones_url":"https://api.github.com/repos/chungheepark/react-study/milestones{/number}","notifications_url":"https://api.github.com/repos/chungheepark/react-study/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chungheepark/react-study/labels{/name}","releases_url":"https://api.github.com/repos/chungheepark/react-study/releases{/id}","deployments_url":"https://api.github.com/repos/chungheepark/react-study/deployments","created_at":"2016-05-22T13:28:45Z","updated_at":"2016-05-23T06:35:54Z","pushed_at":"2016-05-30T01:53:11Z","git_url":"git://github.com/chungheepark/react-study.git","ssh_url":"git@github.com:chungheepark/react-study.git","clone_url":"https://github.com/chungheepark/react-study.git","svn_url":"https://github.com/chungheepark/react-study","homepage":null,"size":10,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chungheepark/react-study/pulls/4"},"html":{"href":"https://github.com/chungheepark/react-study/pull/4"},"issue":{"href":"https://api.github.com/repos/chungheepark/react-study/issues/4"},"comments":{"href":"https://api.github.com/repos/chungheepark/react-study/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/chungheepark/react-study/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/chungheepark/react-study/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chungheepark/react-study/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/chungheepark/react-study/statuses/3e91b16acacb528fccdecc25addd305b512b510e"}}}}
{"actor":{"display_login":"devhyunjae"}}