{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/react/pulls/comments/61356235","id":61356235,"diff_hunk":"@@ -778,8 +778,11 @@ var ReactClass = {\n         // We allow auto-mocks to proceed as if they're returning null.\n         if (initialState === undefined &&\n             this.getInitialState._isMockFunction) {\n-          // This is probably bad practice. Consider warning here and\n-          // deprecating this convenience.\n+          warning(\n+            typeof initialState === 'object' && initialState == null && !Array.isArray(initialState),","path":"src/isomorphic/classic/class/ReactClass.js","position":7,"original_position":7,"commit_id":"82ee4ee04ef39e2861d3a556786875e91191d8a5","original_commit_id":"82ee4ee04ef39e2861d3a556786875e91191d8a5","user":{"login":"zpao","id":8445,"avatar_url":"https://avatars.githubusercontent.com/u/8445?v=3","gravatar_id":"","url":"https://api.github.com/users/zpao","html_url":"https://github.com/zpao","followers_url":"https://api.github.com/users/zpao/followers","following_url":"https://api.github.com/users/zpao/following{/other_user}","gists_url":"https://api.github.com/users/zpao/gists{/gist_id}","starred_url":"https://api.github.com/users/zpao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zpao/subscriptions","organizations_url":"https://api.github.com/users/zpao/orgs","repos_url":"https://api.github.com/users/zpao/repos","events_url":"https://api.github.com/users/zpao/events{/privacy}","received_events_url":"https://api.github.com/users/zpao/received_events","type":"User","site_admin":false},"body":"We already know that `initialState === undefined` so this condition will never be met and we'll always warn. It's also an entirely unactionable warning as this only happens when a component is mocked.","created_at":"2016-04-27T23:55:23Z","updated_at":"2016-04-27T23:55:23Z","html_url":"https://github.com/facebook/react/pull/6636#discussion_r61356235","pull_request_url":"https://api.github.com/repos/facebook/react/pulls/6636","_links":{"self":{"href":"https://api.github.com/repos/facebook/react/pulls/comments/61356235"},"html":{"href":"https://github.com/facebook/react/pull/6636#discussion_r61356235"},"pull_request":{"href":"https://api.github.com/repos/facebook/react/pulls/6636"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/react/pulls/6636","id":68142052,"html_url":"https://github.com/facebook/react/pull/6636","diff_url":"https://github.com/facebook/react/pull/6636.diff","patch_url":"https://github.com/facebook/react/pull/6636.patch","issue_url":"https://api.github.com/repos/facebook/react/issues/6636","number":6636,"state":"open","locked":false,"title":"Integrated warning on returning null","user":{"login":"ev1stensberg","id":16735925,"avatar_url":"https://avatars.githubusercontent.com/u/16735925?v=3","gravatar_id":"","url":"https://api.github.com/users/ev1stensberg","html_url":"https://github.com/ev1stensberg","followers_url":"https://api.github.com/users/ev1stensberg/followers","following_url":"https://api.github.com/users/ev1stensberg/following{/other_user}","gists_url":"https://api.github.com/users/ev1stensberg/gists{/gist_id}","starred_url":"https://api.github.com/users/ev1stensberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev1stensberg/subscriptions","organizations_url":"https://api.github.com/users/ev1stensberg/orgs","repos_url":"https://api.github.com/users/ev1stensberg/repos","events_url":"https://api.github.com/users/ev1stensberg/events{/privacy}","received_events_url":"https://api.github.com/users/ev1stensberg/received_events","type":"User","site_admin":false},"body":"## Warns if user returns null to initialstate ( hopefully )\r\n\r\n### Things I don't know about this PR.\r\n\r\n- **Integration with jest**\r\n- **If we should warn at all**\r\n\r\n***\r\n\r\n_Feel free to close this PR if this change is not appropriate( @jimfb )_ 😆 ","created_at":"2016-04-27T23:31:17Z","updated_at":"2016-04-27T23:55:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f5e31a6790342073c38578fa27ec896c37abd3e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react/pulls/6636/commits","review_comments_url":"https://api.github.com/repos/facebook/react/pulls/6636/comments","review_comment_url":"https://api.github.com/repos/facebook/react/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react/issues/6636/comments","statuses_url":"https://api.github.com/repos/facebook/react/statuses/82ee4ee04ef39e2861d3a556786875e91191d8a5","head":{"label":"ev1stensberg:patch-4","ref":"patch-4","sha":"82ee4ee04ef39e2861d3a556786875e91191d8a5","user":{"login":"ev1stensberg","id":16735925,"avatar_url":"https://avatars.githubusercontent.com/u/16735925?v=3","gravatar_id":"","url":"https://api.github.com/users/ev1stensberg","html_url":"https://github.com/ev1stensberg","followers_url":"https://api.github.com/users/ev1stensberg/followers","following_url":"https://api.github.com/users/ev1stensberg/following{/other_user}","gists_url":"https://api.github.com/users/ev1stensberg/gists{/gist_id}","starred_url":"https://api.github.com/users/ev1stensberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev1stensberg/subscriptions","organizations_url":"https://api.github.com/users/ev1stensberg/orgs","repos_url":"https://api.github.com/users/ev1stensberg/repos","events_url":"https://api.github.com/users/ev1stensberg/events{/privacy}","received_events_url":"https://api.github.com/users/ev1stensberg/received_events","type":"User","site_admin":false},"repo":{"id":55831189,"name":"react","full_name":"ev1stensberg/react","owner":{"login":"ev1stensberg","id":16735925,"avatar_url":"https://avatars.githubusercontent.com/u/16735925?v=3","gravatar_id":"","url":"https://api.github.com/users/ev1stensberg","html_url":"https://github.com/ev1stensberg","followers_url":"https://api.github.com/users/ev1stensberg/followers","following_url":"https://api.github.com/users/ev1stensberg/following{/other_user}","gists_url":"https://api.github.com/users/ev1stensberg/gists{/gist_id}","starred_url":"https://api.github.com/users/ev1stensberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev1stensberg/subscriptions","organizations_url":"https://api.github.com/users/ev1stensberg/orgs","repos_url":"https://api.github.com/users/ev1stensberg/repos","events_url":"https://api.github.com/users/ev1stensberg/events{/privacy}","received_events_url":"https://api.github.com/users/ev1stensberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ev1stensberg/react","description":"Personal React repo to experiment ","fork":true,"url":"https://api.github.com/repos/ev1stensberg/react","forks_url":"https://api.github.com/repos/ev1stensberg/react/forks","keys_url":"https://api.github.com/repos/ev1stensberg/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ev1stensberg/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ev1stensberg/react/teams","hooks_url":"https://api.github.com/repos/ev1stensberg/react/hooks","issue_events_url":"https://api.github.com/repos/ev1stensberg/react/issues/events{/number}","events_url":"https://api.github.com/repos/ev1stensberg/react/events","assignees_url":"https://api.github.com/repos/ev1stensberg/react/assignees{/user}","branches_url":"https://api.github.com/repos/ev1stensberg/react/branches{/branch}","tags_url":"https://api.github.com/repos/ev1stensberg/react/tags","blobs_url":"https://api.github.com/repos/ev1stensberg/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ev1stensberg/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ev1stensberg/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/ev1stensberg/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ev1stensberg/react/statuses/{sha}","languages_url":"https://api.github.com/repos/ev1stensberg/react/languages","stargazers_url":"https://api.github.com/repos/ev1stensberg/react/stargazers","contributors_url":"https://api.github.com/repos/ev1stensberg/react/contributors","subscribers_url":"https://api.github.com/repos/ev1stensberg/react/subscribers","subscription_url":"https://api.github.com/repos/ev1stensberg/react/subscription","commits_url":"https://api.github.com/repos/ev1stensberg/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/ev1stensberg/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/ev1stensberg/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/ev1stensberg/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/ev1stensberg/react/contents/{+path}","compare_url":"https://api.github.com/repos/ev1stensberg/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ev1stensberg/react/merges","archive_url":"https://api.github.com/repos/ev1stensberg/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ev1stensberg/react/downloads","issues_url":"https://api.github.com/repos/ev1stensberg/react/issues{/number}","pulls_url":"https://api.github.com/repos/ev1stensberg/react/pulls{/number}","milestones_url":"https://api.github.com/repos/ev1stensberg/react/milestones{/number}","notifications_url":"https://api.github.com/repos/ev1stensberg/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ev1stensberg/react/labels{/name}","releases_url":"https://api.github.com/repos/ev1stensberg/react/releases{/id}","deployments_url":"https://api.github.com/repos/ev1stensberg/react/deployments","created_at":"2016-04-09T07:18:29Z","updated_at":"2016-04-26T16:38:41Z","pushed_at":"2016-04-27T23:35:23Z","git_url":"git://github.com/ev1stensberg/react.git","ssh_url":"git@github.com:ev1stensberg/react.git","clone_url":"https://github.com/ev1stensberg/react.git","svn_url":"https://github.com/ev1stensberg/react","homepage":"https://facebook.github.io/react/","size":88367,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"facebook:master","ref":"master","sha":"b8f8360b5ceece894265f3e7015b6ed287603d03","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":10270250,"name":"react","full_name":"facebook/react","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react","description":"A declarative, efficient, and flexible JavaScript library for building user interfaces.","fork":false,"url":"https://api.github.com/repos/facebook/react","forks_url":"https://api.github.com/repos/facebook/react/forks","keys_url":"https://api.github.com/repos/facebook/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react/teams","hooks_url":"https://api.github.com/repos/facebook/react/hooks","issue_events_url":"https://api.github.com/repos/facebook/react/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react/events","assignees_url":"https://api.github.com/repos/facebook/react/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react/tags","blobs_url":"https://api.github.com/repos/facebook/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react/languages","stargazers_url":"https://api.github.com/repos/facebook/react/stargazers","contributors_url":"https://api.github.com/repos/facebook/react/contributors","subscribers_url":"https://api.github.com/repos/facebook/react/subscribers","subscription_url":"https://api.github.com/repos/facebook/react/subscription","commits_url":"https://api.github.com/repos/facebook/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react/merges","archive_url":"https://api.github.com/repos/facebook/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react/downloads","issues_url":"https://api.github.com/repos/facebook/react/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/react/deployments","created_at":"2013-05-24T16:15:54Z","updated_at":"2016-04-27T22:27:43Z","pushed_at":"2016-04-27T23:31:18Z","git_url":"git://github.com/facebook/react.git","ssh_url":"git@github.com:facebook/react.git","clone_url":"https://github.com/facebook/react.git","svn_url":"https://github.com/facebook/react","homepage":"https://facebook.github.io/react/","size":109036,"stargazers_count":41193,"watchers_count":41193,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6963,"mirror_url":null,"open_issues_count":531,"forks":6963,"open_issues":531,"watchers":41193,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react/pulls/6636"},"html":{"href":"https://github.com/facebook/react/pull/6636"},"issue":{"href":"https://api.github.com/repos/facebook/react/issues/6636"},"comments":{"href":"https://api.github.com/repos/facebook/react/issues/6636/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react/pulls/6636/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react/pulls/6636/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react/statuses/82ee4ee04ef39e2861d3a556786875e91191d8a5"}}}}