{"action":"created","comment":{"url":"https://api.github.com/repos/Lemoncode/react-by-sample/pulls/comments/85664573","pull_request_review_id":6367802,"id":85664573,"diff_hunk":"@@ -1,37 +1,35 @@\n import * as React from \"react\"\n import {hashHistory} from 'react-router'\n import {LoginEntity} from '../../model/login';\n+import {FormField} from '../common/formField';\n \n interface Props {\n    loginInfo : LoginEntity;\n    updateLoginInfo : (loginInfo : LoginEntity) => void;\n    performLogin : () => void;\n }\n \n-export const Form = (props: Props) => {\n+export class Form extends React.Component<Props, {}> {","path":"15 LoginForm/src/pages/login/form.tsx","position":13,"original_position":13,"commit_id":"8a0b9bbf865469f24e73f84c347c8930adce2ae6","original_commit_id":"8a0b9bbf865469f24e73f84c347c8930adce2ae6","user":{"login":"rumbado","id":7839099,"avatar_url":"https://avatars.githubusercontent.com/u/7839099?v=3","gravatar_id":"","url":"https://api.github.com/users/rumbado","html_url":"https://github.com/rumbado","followers_url":"https://api.github.com/users/rumbado/followers","following_url":"https://api.github.com/users/rumbado/following{/other_user}","gists_url":"https://api.github.com/users/rumbado/gists{/gist_id}","starred_url":"https://api.github.com/users/rumbado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rumbado/subscriptions","organizations_url":"https://api.github.com/users/rumbado/orgs","repos_url":"https://api.github.com/users/rumbado/repos","events_url":"https://api.github.com/users/rumbado/events{/privacy}","received_events_url":"https://api.github.com/users/rumbado/received_events","type":"User","site_admin":false},"body":"I added the private function:\r\n'''javascript\r\nupdateFieldValue(fieldName: string, fieldValue: any){\r\n    const newLoginEntity = this.props.loginInfo;\r\n    newLoginEntity[fieldName] = fieldValue;\r\n    this.props.updateLoginInfo(newLoginEntity);\r\n  }\r\n''''\r\nCan that be done without promoting it to class?","created_at":"2016-10-30T17:34:54Z","updated_at":"2016-10-30T17:34:55Z","html_url":"https://github.com/Lemoncode/react-by-sample/pull/42#discussion_r85664573","pull_request_url":"https://api.github.com/repos/Lemoncode/react-by-sample/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/Lemoncode/react-by-sample/pulls/comments/85664573"},"html":{"href":"https://github.com/Lemoncode/react-by-sample/pull/42#discussion_r85664573"},"pull_request":{"href":"https://api.github.com/repos/Lemoncode/react-by-sample/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/Lemoncode/react-by-sample/pulls/42","id":91528120,"html_url":"https://github.com/Lemoncode/react-by-sample/pull/42","diff_url":"https://github.com/Lemoncode/react-by-sample/pull/42.diff","patch_url":"https://github.com/Lemoncode/react-by-sample/pull/42.patch","issue_url":"https://api.github.com/repos/Lemoncode/react-by-sample/issues/42","number":42,"state":"open","locked":false,"title":"Two new components to center content and to add a field to a form","user":{"login":"rumbado","id":7839099,"avatar_url":"https://avatars.githubusercontent.com/u/7839099?v=3","gravatar_id":"","url":"https://api.github.com/users/rumbado","html_url":"https://github.com/rumbado","followers_url":"https://api.github.com/users/rumbado/followers","following_url":"https://api.github.com/users/rumbado/following{/other_user}","gists_url":"https://api.github.com/users/rumbado/gists{/gist_id}","starred_url":"https://api.github.com/users/rumbado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rumbado/subscriptions","organizations_url":"https://api.github.com/users/rumbado/orgs","repos_url":"https://api.github.com/users/rumbado/repos","events_url":"https://api.github.com/users/rumbado/events{/privacy}","received_events_url":"https://api.github.com/users/rumbado/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-30T17:03:27Z","updated_at":"2016-10-30T17:34:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7410adb7fa0c53f5848d0b5bba542a79ff084457","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Lemoncode/react-by-sample/pulls/42/commits","review_comments_url":"https://api.github.com/repos/Lemoncode/react-by-sample/pulls/42/comments","review_comment_url":"https://api.github.com/repos/Lemoncode/react-by-sample/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Lemoncode/react-by-sample/issues/42/comments","statuses_url":"https://api.github.com/repos/Lemoncode/react-by-sample/statuses/8a0b9bbf865469f24e73f84c347c8930adce2ae6","head":{"label":"rumbado:example_15_simplify_components","ref":"example_15_simplify_components","sha":"8a0b9bbf865469f24e73f84c347c8930adce2ae6","user":{"login":"rumbado","id":7839099,"avatar_url":"https://avatars.githubusercontent.com/u/7839099?v=3","gravatar_id":"","url":"https://api.github.com/users/rumbado","html_url":"https://github.com/rumbado","followers_url":"https://api.github.com/users/rumbado/followers","following_url":"https://api.github.com/users/rumbado/following{/other_user}","gists_url":"https://api.github.com/users/rumbado/gists{/gist_id}","starred_url":"https://api.github.com/users/rumbado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rumbado/subscriptions","organizations_url":"https://api.github.com/users/rumbado/orgs","repos_url":"https://api.github.com/users/rumbado/repos","events_url":"https://api.github.com/users/rumbado/events{/privacy}","received_events_url":"https://api.github.com/users/rumbado/received_events","type":"User","site_admin":false},"repo":{"id":72338514,"name":"react-by-sample","full_name":"rumbado/react-by-sample","owner":{"login":"rumbado","id":7839099,"avatar_url":"https://avatars.githubusercontent.com/u/7839099?v=3","gravatar_id":"","url":"https://api.github.com/users/rumbado","html_url":"https://github.com/rumbado","followers_url":"https://api.github.com/users/rumbado/followers","following_url":"https://api.github.com/users/rumbado/following{/other_user}","gists_url":"https://api.github.com/users/rumbado/gists{/gist_id}","starred_url":"https://api.github.com/users/rumbado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rumbado/subscriptions","organizations_url":"https://api.github.com/users/rumbado/orgs","repos_url":"https://api.github.com/users/rumbado/repos","events_url":"https://api.github.com/users/rumbado/events{/privacy}","received_events_url":"https://api.github.com/users/rumbado/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rumbado/react-by-sample","description":"Set of basic React + Typescript guided samples, cover basic principles of this technology.","fork":true,"url":"https://api.github.com/repos/rumbado/react-by-sample","forks_url":"https://api.github.com/repos/rumbado/react-by-sample/forks","keys_url":"https://api.github.com/repos/rumbado/react-by-sample/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rumbado/react-by-sample/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rumbado/react-by-sample/teams","hooks_url":"https://api.github.com/repos/rumbado/react-by-sample/hooks","issue_events_url":"https://api.github.com/repos/rumbado/react-by-sample/issues/events{/number}","events_url":"https://api.github.com/repos/rumbado/react-by-sample/events","assignees_url":"https://api.github.com/repos/rumbado/react-by-sample/assignees{/user}","branches_url":"https://api.github.com/repos/rumbado/react-by-sample/branches{/branch}","tags_url":"https://api.github.com/repos/rumbado/react-by-sample/tags","blobs_url":"https://api.github.com/repos/rumbado/react-by-sample/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rumbado/react-by-sample/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rumbado/react-by-sample/git/refs{/sha}","trees_url":"https://api.github.com/repos/rumbado/react-by-sample/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rumbado/react-by-sample/statuses/{sha}","languages_url":"https://api.github.com/repos/rumbado/react-by-sample/languages","stargazers_url":"https://api.github.com/repos/rumbado/react-by-sample/stargazers","contributors_url":"https://api.github.com/repos/rumbado/react-by-sample/contributors","subscribers_url":"https://api.github.com/repos/rumbado/react-by-sample/subscribers","subscription_url":"https://api.github.com/repos/rumbado/react-by-sample/subscription","commits_url":"https://api.github.com/repos/rumbado/react-by-sample/commits{/sha}","git_commits_url":"https://api.github.com/repos/rumbado/react-by-sample/git/commits{/sha}","comments_url":"https://api.github.com/repos/rumbado/react-by-sample/comments{/number}","issue_comment_url":"https://api.github.com/repos/rumbado/react-by-sample/issues/comments{/number}","contents_url":"https://api.github.com/repos/rumbado/react-by-sample/contents/{+path}","compare_url":"https://api.github.com/repos/rumbado/react-by-sample/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rumbado/react-by-sample/merges","archive_url":"https://api.github.com/repos/rumbado/react-by-sample/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rumbado/react-by-sample/downloads","issues_url":"https://api.github.com/repos/rumbado/react-by-sample/issues{/number}","pulls_url":"https://api.github.com/repos/rumbado/react-by-sample/pulls{/number}","milestones_url":"https://api.github.com/repos/rumbado/react-by-sample/milestones{/number}","notifications_url":"https://api.github.com/repos/rumbado/react-by-sample/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rumbado/react-by-sample/labels{/name}","releases_url":"https://api.github.com/repos/rumbado/react-by-sample/releases{/id}","deployments_url":"https://api.github.com/repos/rumbado/react-by-sample/deployments","created_at":"2016-10-30T08:46:52Z","updated_at":"2016-10-30T08:46:53Z","pushed_at":"2016-10-30T17:01:54Z","git_url":"git://github.com/rumbado/react-by-sample.git","ssh_url":"git@github.com:rumbado/react-by-sample.git","clone_url":"https://github.com/rumbado/react-by-sample.git","svn_url":"https://github.com/rumbado/react-by-sample","homepage":"","size":175,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Lemoncode:master","ref":"master","sha":"079d1ad54f6f063fe94c138a325b5a2985bfd86a","user":{"login":"Lemoncode","id":7702396,"avatar_url":"https://avatars.githubusercontent.com/u/7702396?v=3","gravatar_id":"","url":"https://api.github.com/users/Lemoncode","html_url":"https://github.com/Lemoncode","followers_url":"https://api.github.com/users/Lemoncode/followers","following_url":"https://api.github.com/users/Lemoncode/following{/other_user}","gists_url":"https://api.github.com/users/Lemoncode/gists{/gist_id}","starred_url":"https://api.github.com/users/Lemoncode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lemoncode/subscriptions","organizations_url":"https://api.github.com/users/Lemoncode/orgs","repos_url":"https://api.github.com/users/Lemoncode/repos","events_url":"https://api.github.com/users/Lemoncode/events{/privacy}","received_events_url":"https://api.github.com/users/Lemoncode/received_events","type":"Organization","site_admin":false},"repo":{"id":70802482,"name":"react-by-sample","full_name":"Lemoncode/react-by-sample","owner":{"login":"Lemoncode","id":7702396,"avatar_url":"https://avatars.githubusercontent.com/u/7702396?v=3","gravatar_id":"","url":"https://api.github.com/users/Lemoncode","html_url":"https://github.com/Lemoncode","followers_url":"https://api.github.com/users/Lemoncode/followers","following_url":"https://api.github.com/users/Lemoncode/following{/other_user}","gists_url":"https://api.github.com/users/Lemoncode/gists{/gist_id}","starred_url":"https://api.github.com/users/Lemoncode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lemoncode/subscriptions","organizations_url":"https://api.github.com/users/Lemoncode/orgs","repos_url":"https://api.github.com/users/Lemoncode/repos","events_url":"https://api.github.com/users/Lemoncode/events{/privacy}","received_events_url":"https://api.github.com/users/Lemoncode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Lemoncode/react-by-sample","description":"Set of basic React + Typescript guided samples, cover basic principles of this technology.","fork":false,"url":"https://api.github.com/repos/Lemoncode/react-by-sample","forks_url":"https://api.github.com/repos/Lemoncode/react-by-sample/forks","keys_url":"https://api.github.com/repos/Lemoncode/react-by-sample/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Lemoncode/react-by-sample/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Lemoncode/react-by-sample/teams","hooks_url":"https://api.github.com/repos/Lemoncode/react-by-sample/hooks","issue_events_url":"https://api.github.com/repos/Lemoncode/react-by-sample/issues/events{/number}","events_url":"https://api.github.com/repos/Lemoncode/react-by-sample/events","assignees_url":"https://api.github.com/repos/Lemoncode/react-by-sample/assignees{/user}","branches_url":"https://api.github.com/repos/Lemoncode/react-by-sample/branches{/branch}","tags_url":"https://api.github.com/repos/Lemoncode/react-by-sample/tags","blobs_url":"https://api.github.com/repos/Lemoncode/react-by-sample/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Lemoncode/react-by-sample/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Lemoncode/react-by-sample/git/refs{/sha}","trees_url":"https://api.github.com/repos/Lemoncode/react-by-sample/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Lemoncode/react-by-sample/statuses/{sha}","languages_url":"https://api.github.com/repos/Lemoncode/react-by-sample/languages","stargazers_url":"https://api.github.com/repos/Lemoncode/react-by-sample/stargazers","contributors_url":"https://api.github.com/repos/Lemoncode/react-by-sample/contributors","subscribers_url":"https://api.github.com/repos/Lemoncode/react-by-sample/subscribers","subscription_url":"https://api.github.com/repos/Lemoncode/react-by-sample/subscription","commits_url":"https://api.github.com/repos/Lemoncode/react-by-sample/commits{/sha}","git_commits_url":"https://api.github.com/repos/Lemoncode/react-by-sample/git/commits{/sha}","comments_url":"https://api.github.com/repos/Lemoncode/react-by-sample/comments{/number}","issue_comment_url":"https://api.github.com/repos/Lemoncode/react-by-sample/issues/comments{/number}","contents_url":"https://api.github.com/repos/Lemoncode/react-by-sample/contents/{+path}","compare_url":"https://api.github.com/repos/Lemoncode/react-by-sample/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Lemoncode/react-by-sample/merges","archive_url":"https://api.github.com/repos/Lemoncode/react-by-sample/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Lemoncode/react-by-sample/downloads","issues_url":"https://api.github.com/repos/Lemoncode/react-by-sample/issues{/number}","pulls_url":"https://api.github.com/repos/Lemoncode/react-by-sample/pulls{/number}","milestones_url":"https://api.github.com/repos/Lemoncode/react-by-sample/milestones{/number}","notifications_url":"https://api.github.com/repos/Lemoncode/react-by-sample/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Lemoncode/react-by-sample/labels{/name}","releases_url":"https://api.github.com/repos/Lemoncode/react-by-sample/releases{/id}","deployments_url":"https://api.github.com/repos/Lemoncode/react-by-sample/deployments","created_at":"2016-10-13T12:06:50Z","updated_at":"2016-10-30T08:46:38Z","pushed_at":"2016-10-30T17:12:09Z","git_url":"git://github.com/Lemoncode/react-by-sample.git","ssh_url":"git@github.com:Lemoncode/react-by-sample.git","clone_url":"https://github.com/Lemoncode/react-by-sample.git","svn_url":"https://github.com/Lemoncode/react-by-sample","homepage":"","size":175,"stargazers_count":10,"watchers_count":10,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":22,"forks":5,"open_issues":22,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Lemoncode/react-by-sample/pulls/42"},"html":{"href":"https://github.com/Lemoncode/react-by-sample/pull/42"},"issue":{"href":"https://api.github.com/repos/Lemoncode/react-by-sample/issues/42"},"comments":{"href":"https://api.github.com/repos/Lemoncode/react-by-sample/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/Lemoncode/react-by-sample/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/Lemoncode/react-by-sample/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Lemoncode/react-by-sample/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/Lemoncode/react-by-sample/statuses/8a0b9bbf865469f24e73f84c347c8930adce2ae6"}}}}
{"actor":{"display_login":"rumbado"}}