{"action":"created","comment":{"url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/pulls/comments/181022149","pull_request_review_id":111547701,"id":181022149,"diff_hunk":"@@ -1,10 +1,52 @@\n import React, { Component } from 'react';\n+import ListIterator from './ListIterator';\n \n class App extends Component {\n+  constructor(props) {\n+    super(props);\n+    this.state = {\n+      items: []\n+    }\n+    this.handleSubmit = this.handleSubmit.bind(this);\n+    this.handleDelete = this.handleDelete.bind(this);\n+  }\n+\n+  handleSubmit(event) {\n+    let userInputElement = document.getElementById('userInput');\n+    let currentUserInput = userInputElement.value;\n+    if (currentUserInput !== '') {\n+      if (this.state.items.indexOf(currentUserInput) > -1) {\n+        alert('Duplicate Input');\n+      } else {\n+        this.state.items.push(currentUserInput);","path":"my-app/src/App.js","position":21,"original_position":21,"commit_id":"17bd40a30857b8b54a6413314dccd5a7cc1820ea","original_commit_id":"17bd40a30857b8b54a6413314dccd5a7cc1820ea","user":{"login":"swapnil-webonise","id":4845939,"avatar_url":"https://avatars1.githubusercontent.com/u/4845939?v=4","gravatar_id":"","url":"https://api.github.com/users/swapnil-webonise","html_url":"https://github.com/swapnil-webonise","followers_url":"https://api.github.com/users/swapnil-webonise/followers","following_url":"https://api.github.com/users/swapnil-webonise/following{/other_user}","gists_url":"https://api.github.com/users/swapnil-webonise/gists{/gist_id}","starred_url":"https://api.github.com/users/swapnil-webonise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swapnil-webonise/subscriptions","organizations_url":"https://api.github.com/users/swapnil-webonise/orgs","repos_url":"https://api.github.com/users/swapnil-webonise/repos","events_url":"https://api.github.com/users/swapnil-webonise/events{/privacy}","received_events_url":"https://api.github.com/users/swapnil-webonise/received_events","type":"User","site_admin":false},"body":"Never mutate state variables, Make a copy of it and modify copy then set back to the state using setState Method.\r\n```\r\nlet items = [...this.state.items];\r\nitems.push(currentUserInput);\r\nthis.setState({\r\nitems: items\r\n});\r\n```","created_at":"2018-04-12T09:39:10Z","updated_at":"2018-04-12T09:42:03Z","html_url":"https://github.com/akshayp-webonise/JavaScriptTraining/pull/2#discussion_r181022149","pull_request_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/pulls/2","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/pulls/comments/181022149"},"html":{"href":"https://github.com/akshayp-webonise/JavaScriptTraining/pull/2#discussion_r181022149"},"pull_request":{"href":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/pulls/2","id":181142378,"html_url":"https://github.com/akshayp-webonise/JavaScriptTraining/pull/2","diff_url":"https://github.com/akshayp-webonise/JavaScriptTraining/pull/2.diff","patch_url":"https://github.com/akshayp-webonise/JavaScriptTraining/pull/2.patch","issue_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/issues/2","number":2,"state":"open","locked":false,"title":"Basic To Do App created","user":{"login":"akshayp-webonise","id":23208057,"avatar_url":"https://avatars1.githubusercontent.com/u/23208057?v=4","gravatar_id":"","url":"https://api.github.com/users/akshayp-webonise","html_url":"https://github.com/akshayp-webonise","followers_url":"https://api.github.com/users/akshayp-webonise/followers","following_url":"https://api.github.com/users/akshayp-webonise/following{/other_user}","gists_url":"https://api.github.com/users/akshayp-webonise/gists{/gist_id}","starred_url":"https://api.github.com/users/akshayp-webonise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshayp-webonise/subscriptions","organizations_url":"https://api.github.com/users/akshayp-webonise/orgs","repos_url":"https://api.github.com/users/akshayp-webonise/repos","events_url":"https://api.github.com/users/akshayp-webonise/events{/privacy}","received_events_url":"https://api.github.com/users/akshayp-webonise/received_events","type":"User","site_admin":false},"body":"Basic To Do App","created_at":"2018-04-12T09:32:03Z","updated_at":"2018-04-12T09:42:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9df7f1b46d2cdce97e22728732dc1a2e56783a9d","assignee":{"login":"akshayp-webonise","id":23208057,"avatar_url":"https://avatars1.githubusercontent.com/u/23208057?v=4","gravatar_id":"","url":"https://api.github.com/users/akshayp-webonise","html_url":"https://github.com/akshayp-webonise","followers_url":"https://api.github.com/users/akshayp-webonise/followers","following_url":"https://api.github.com/users/akshayp-webonise/following{/other_user}","gists_url":"https://api.github.com/users/akshayp-webonise/gists{/gist_id}","starred_url":"https://api.github.com/users/akshayp-webonise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshayp-webonise/subscriptions","organizations_url":"https://api.github.com/users/akshayp-webonise/orgs","repos_url":"https://api.github.com/users/akshayp-webonise/repos","events_url":"https://api.github.com/users/akshayp-webonise/events{/privacy}","received_events_url":"https://api.github.com/users/akshayp-webonise/received_events","type":"User","site_admin":false},"assignees":[{"login":"akshayp-webonise","id":23208057,"avatar_url":"https://avatars1.githubusercontent.com/u/23208057?v=4","gravatar_id":"","url":"https://api.github.com/users/akshayp-webonise","html_url":"https://github.com/akshayp-webonise","followers_url":"https://api.github.com/users/akshayp-webonise/followers","following_url":"https://api.github.com/users/akshayp-webonise/following{/other_user}","gists_url":"https://api.github.com/users/akshayp-webonise/gists{/gist_id}","starred_url":"https://api.github.com/users/akshayp-webonise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshayp-webonise/subscriptions","organizations_url":"https://api.github.com/users/akshayp-webonise/orgs","repos_url":"https://api.github.com/users/akshayp-webonise/repos","events_url":"https://api.github.com/users/akshayp-webonise/events{/privacy}","received_events_url":"https://api.github.com/users/akshayp-webonise/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/pulls/2/commits","review_comments_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/pulls/2/comments","review_comment_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/issues/2/comments","statuses_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/statuses/17bd40a30857b8b54a6413314dccd5a7cc1820ea","head":{"label":"akshayp-webonise:to-do-app","ref":"to-do-app","sha":"17bd40a30857b8b54a6413314dccd5a7cc1820ea","user":{"login":"akshayp-webonise","id":23208057,"avatar_url":"https://avatars1.githubusercontent.com/u/23208057?v=4","gravatar_id":"","url":"https://api.github.com/users/akshayp-webonise","html_url":"https://github.com/akshayp-webonise","followers_url":"https://api.github.com/users/akshayp-webonise/followers","following_url":"https://api.github.com/users/akshayp-webonise/following{/other_user}","gists_url":"https://api.github.com/users/akshayp-webonise/gists{/gist_id}","starred_url":"https://api.github.com/users/akshayp-webonise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshayp-webonise/subscriptions","organizations_url":"https://api.github.com/users/akshayp-webonise/orgs","repos_url":"https://api.github.com/users/akshayp-webonise/repos","events_url":"https://api.github.com/users/akshayp-webonise/events{/privacy}","received_events_url":"https://api.github.com/users/akshayp-webonise/received_events","type":"User","site_admin":false},"repo":{"id":128922780,"name":"JavaScriptTraining","full_name":"akshayp-webonise/JavaScriptTraining","owner":{"login":"akshayp-webonise","id":23208057,"avatar_url":"https://avatars1.githubusercontent.com/u/23208057?v=4","gravatar_id":"","url":"https://api.github.com/users/akshayp-webonise","html_url":"https://github.com/akshayp-webonise","followers_url":"https://api.github.com/users/akshayp-webonise/followers","following_url":"https://api.github.com/users/akshayp-webonise/following{/other_user}","gists_url":"https://api.github.com/users/akshayp-webonise/gists{/gist_id}","starred_url":"https://api.github.com/users/akshayp-webonise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshayp-webonise/subscriptions","organizations_url":"https://api.github.com/users/akshayp-webonise/orgs","repos_url":"https://api.github.com/users/akshayp-webonise/repos","events_url":"https://api.github.com/users/akshayp-webonise/events{/privacy}","received_events_url":"https://api.github.com/users/akshayp-webonise/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akshayp-webonise/JavaScriptTraining","description":"React Redux Training","fork":false,"url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining","forks_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/forks","keys_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/teams","hooks_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/hooks","issue_events_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/issues/events{/number}","events_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/events","assignees_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/assignees{/user}","branches_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/branches{/branch}","tags_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/tags","blobs_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/git/refs{/sha}","trees_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/statuses/{sha}","languages_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/languages","stargazers_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/stargazers","contributors_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/contributors","subscribers_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/subscribers","subscription_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/subscription","commits_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/commits{/sha}","git_commits_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/git/commits{/sha}","comments_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/comments{/number}","issue_comment_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/issues/comments{/number}","contents_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/contents/{+path}","compare_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/merges","archive_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/downloads","issues_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/issues{/number}","pulls_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/pulls{/number}","milestones_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/milestones{/number}","notifications_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/labels{/name}","releases_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/releases{/id}","deployments_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/deployments","created_at":"2018-04-10T11:35:02Z","updated_at":"2018-04-10T12:38:50Z","pushed_at":"2018-04-12T09:32:04Z","git_url":"git://github.com/akshayp-webonise/JavaScriptTraining.git","ssh_url":"git@github.com:akshayp-webonise/JavaScriptTraining.git","clone_url":"https://github.com/akshayp-webonise/JavaScriptTraining.git","svn_url":"https://github.com/akshayp-webonise/JavaScriptTraining","homepage":null,"size":130,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"akshayp-webonise:master","ref":"master","sha":"82247dbff580bc7e39f825724786f732b95cb683","user":{"login":"akshayp-webonise","id":23208057,"avatar_url":"https://avatars1.githubusercontent.com/u/23208057?v=4","gravatar_id":"","url":"https://api.github.com/users/akshayp-webonise","html_url":"https://github.com/akshayp-webonise","followers_url":"https://api.github.com/users/akshayp-webonise/followers","following_url":"https://api.github.com/users/akshayp-webonise/following{/other_user}","gists_url":"https://api.github.com/users/akshayp-webonise/gists{/gist_id}","starred_url":"https://api.github.com/users/akshayp-webonise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshayp-webonise/subscriptions","organizations_url":"https://api.github.com/users/akshayp-webonise/orgs","repos_url":"https://api.github.com/users/akshayp-webonise/repos","events_url":"https://api.github.com/users/akshayp-webonise/events{/privacy}","received_events_url":"https://api.github.com/users/akshayp-webonise/received_events","type":"User","site_admin":false},"repo":{"id":128922780,"name":"JavaScriptTraining","full_name":"akshayp-webonise/JavaScriptTraining","owner":{"login":"akshayp-webonise","id":23208057,"avatar_url":"https://avatars1.githubusercontent.com/u/23208057?v=4","gravatar_id":"","url":"https://api.github.com/users/akshayp-webonise","html_url":"https://github.com/akshayp-webonise","followers_url":"https://api.github.com/users/akshayp-webonise/followers","following_url":"https://api.github.com/users/akshayp-webonise/following{/other_user}","gists_url":"https://api.github.com/users/akshayp-webonise/gists{/gist_id}","starred_url":"https://api.github.com/users/akshayp-webonise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshayp-webonise/subscriptions","organizations_url":"https://api.github.com/users/akshayp-webonise/orgs","repos_url":"https://api.github.com/users/akshayp-webonise/repos","events_url":"https://api.github.com/users/akshayp-webonise/events{/privacy}","received_events_url":"https://api.github.com/users/akshayp-webonise/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akshayp-webonise/JavaScriptTraining","description":"React Redux Training","fork":false,"url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining","forks_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/forks","keys_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/teams","hooks_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/hooks","issue_events_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/issues/events{/number}","events_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/events","assignees_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/assignees{/user}","branches_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/branches{/branch}","tags_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/tags","blobs_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/git/refs{/sha}","trees_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/statuses/{sha}","languages_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/languages","stargazers_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/stargazers","contributors_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/contributors","subscribers_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/subscribers","subscription_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/subscription","commits_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/commits{/sha}","git_commits_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/git/commits{/sha}","comments_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/comments{/number}","issue_comment_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/issues/comments{/number}","contents_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/contents/{+path}","compare_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/merges","archive_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/downloads","issues_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/issues{/number}","pulls_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/pulls{/number}","milestones_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/milestones{/number}","notifications_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/labels{/name}","releases_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/releases{/id}","deployments_url":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/deployments","created_at":"2018-04-10T11:35:02Z","updated_at":"2018-04-10T12:38:50Z","pushed_at":"2018-04-12T09:32:04Z","git_url":"git://github.com/akshayp-webonise/JavaScriptTraining.git","ssh_url":"git@github.com:akshayp-webonise/JavaScriptTraining.git","clone_url":"https://github.com/akshayp-webonise/JavaScriptTraining.git","svn_url":"https://github.com/akshayp-webonise/JavaScriptTraining","homepage":null,"size":130,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/pulls/2"},"html":{"href":"https://github.com/akshayp-webonise/JavaScriptTraining/pull/2"},"issue":{"href":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/issues/2"},"comments":{"href":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/akshayp-webonise/JavaScriptTraining/statuses/17bd40a30857b8b54a6413314dccd5a7cc1820ea"}},"author_association":"OWNER"}}
{"actor":{"display_login":"swapnil-webonise"}}