{"action":"created","comment":{"url":"https://api.github.com/repos/Roblox/roact/pulls/comments/165529082","pull_request_review_id":93485775,"id":165529082,"diff_hunk":"@@ -207,6 +211,63 @@ return function()\n \t\t\tend).to.throw()\n \t\tend)\n \n+\t\tit(\"should throw when called in shouldUpdate\", function()\n+\t\t\tlocal TestComponent = Component:extend(\"TestComponent\")\n+\n+\t\t\tlocal shouldUpdate\n+\n+\t\t\tfunction TestComponent:init()\n+\t\t\t\tshouldUpdate = function()\n+\t\t\t\t\tself:shouldUpdate({}, {})\n+\t\t\t\tend\n+\t\t\tend\n+\n+\t\t\tfunction TestComponent:render()\n+\t\t\t\treturn nil\n+\t\t\tend\n+\n+\t\t\tfunction TestComponent:shouldUpdate()\n+\t\t\t\tself:setState({\n+\t\t\t\t\ta = 1\n+\t\t\t\t})\n+\t\t\tend\n+\n+\t\t\tlocal testElement = Core.createElement(TestComponent)\n+\n+\t\t\texpect(function()\n+\t\t\t\tReconciler.reify(testElement)\n+\t\t\t\tshouldUpdate()\n+\t\t\tend).to.throw()","path":"lib/Component.spec.lua","position":null,"original_position":41,"commit_id":"ed1cd2ac187b5c9bb57978b1ad7f29216eff7f89","original_commit_id":"cc7ed18184740cb5040fba0da1a3c006246c0dfc","user":{"login":"AmaranthineCodices","id":31936135,"avatar_url":"https://avatars2.githubusercontent.com/u/31936135?v=4","gravatar_id":"","url":"https://api.github.com/users/AmaranthineCodices","html_url":"https://github.com/AmaranthineCodices","followers_url":"https://api.github.com/users/AmaranthineCodices/followers","following_url":"https://api.github.com/users/AmaranthineCodices/following{/other_user}","gists_url":"https://api.github.com/users/AmaranthineCodices/gists{/gist_id}","starred_url":"https://api.github.com/users/AmaranthineCodices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmaranthineCodices/subscriptions","organizations_url":"https://api.github.com/users/AmaranthineCodices/orgs","repos_url":"https://api.github.com/users/AmaranthineCodices/repos","events_url":"https://api.github.com/users/AmaranthineCodices/events{/privacy}","received_events_url":"https://api.github.com/users/AmaranthineCodices/received_events","type":"User","site_admin":false},"body":"This is true! It looks like this test case only passed to begin with when it re-entered `shouldUpdate`. I've fixed that now.","created_at":"2018-02-02T00:25:27Z","updated_at":"2018-02-02T00:25:27Z","html_url":"https://github.com/Roblox/roact/pull/26#discussion_r165529082","pull_request_url":"https://api.github.com/repos/Roblox/roact/pulls/26","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Roblox/roact/pulls/comments/165529082"},"html":{"href":"https://github.com/Roblox/roact/pull/26#discussion_r165529082"},"pull_request":{"href":"https://api.github.com/repos/Roblox/roact/pulls/26"}},"in_reply_to_id":165525586},"pull_request":{"url":"https://api.github.com/repos/Roblox/roact/pulls/26","id":166609805,"html_url":"https://github.com/Roblox/roact/pull/26","diff_url":"https://github.com/Roblox/roact/pull/26.diff","patch_url":"https://github.com/Roblox/roact/pull/26.patch","issue_url":"https://api.github.com/repos/Roblox/roact/issues/26","number":26,"state":"open","locked":false,"title":"More setState checks","user":{"login":"AmaranthineCodices","id":31936135,"avatar_url":"https://avatars2.githubusercontent.com/u/31936135?v=4","gravatar_id":"","url":"https://api.github.com/users/AmaranthineCodices","html_url":"https://github.com/AmaranthineCodices","followers_url":"https://api.github.com/users/AmaranthineCodices/followers","following_url":"https://api.github.com/users/AmaranthineCodices/following{/other_user}","gists_url":"https://api.github.com/users/AmaranthineCodices/gists{/gist_id}","starred_url":"https://api.github.com/users/AmaranthineCodices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmaranthineCodices/subscriptions","organizations_url":"https://api.github.com/users/AmaranthineCodices/orgs","repos_url":"https://api.github.com/users/AmaranthineCodices/repos","events_url":"https://api.github.com/users/AmaranthineCodices/events{/privacy}","received_events_url":"https://api.github.com/users/AmaranthineCodices/received_events","type":"User","site_admin":false},"body":"This builds on the discussion from #23 after it was merged. It disallows calling `setState` in *all* lifecycle hooks, not just `willUnmount`. The error message has been changed to reflect this:\r\n\r\n```\r\nsetState cannot be used currently: are you calling setState within a lifecycle hook?\r\n```","created_at":"2018-02-01T17:59:37Z","updated_at":"2018-02-02T00:25:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52835c52091f3028b404784f39b7bf49622a6de1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/Roblox/roact/pulls/26/commits","review_comments_url":"https://api.github.com/repos/Roblox/roact/pulls/26/comments","review_comment_url":"https://api.github.com/repos/Roblox/roact/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Roblox/roact/issues/26/comments","statuses_url":"https://api.github.com/repos/Roblox/roact/statuses/ed1cd2ac187b5c9bb57978b1ad7f29216eff7f89","head":{"label":"AmaranthineCodices:more-setState-checks","ref":"more-setState-checks","sha":"ed1cd2ac187b5c9bb57978b1ad7f29216eff7f89","user":{"login":"AmaranthineCodices","id":31936135,"avatar_url":"https://avatars2.githubusercontent.com/u/31936135?v=4","gravatar_id":"","url":"https://api.github.com/users/AmaranthineCodices","html_url":"https://github.com/AmaranthineCodices","followers_url":"https://api.github.com/users/AmaranthineCodices/followers","following_url":"https://api.github.com/users/AmaranthineCodices/following{/other_user}","gists_url":"https://api.github.com/users/AmaranthineCodices/gists{/gist_id}","starred_url":"https://api.github.com/users/AmaranthineCodices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmaranthineCodices/subscriptions","organizations_url":"https://api.github.com/users/AmaranthineCodices/orgs","repos_url":"https://api.github.com/users/AmaranthineCodices/repos","events_url":"https://api.github.com/users/AmaranthineCodices/events{/privacy}","received_events_url":"https://api.github.com/users/AmaranthineCodices/received_events","type":"User","site_admin":false},"repo":{"id":117580831,"name":"roact","full_name":"AmaranthineCodices/roact","owner":{"login":"AmaranthineCodices","id":31936135,"avatar_url":"https://avatars2.githubusercontent.com/u/31936135?v=4","gravatar_id":"","url":"https://api.github.com/users/AmaranthineCodices","html_url":"https://github.com/AmaranthineCodices","followers_url":"https://api.github.com/users/AmaranthineCodices/followers","following_url":"https://api.github.com/users/AmaranthineCodices/following{/other_user}","gists_url":"https://api.github.com/users/AmaranthineCodices/gists{/gist_id}","starred_url":"https://api.github.com/users/AmaranthineCodices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmaranthineCodices/subscriptions","organizations_url":"https://api.github.com/users/AmaranthineCodices/orgs","repos_url":"https://api.github.com/users/AmaranthineCodices/repos","events_url":"https://api.github.com/users/AmaranthineCodices/events{/privacy}","received_events_url":"https://api.github.com/users/AmaranthineCodices/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AmaranthineCodices/roact","description":"A view management library for Roblox Lua like React","fork":true,"url":"https://api.github.com/repos/AmaranthineCodices/roact","forks_url":"https://api.github.com/repos/AmaranthineCodices/roact/forks","keys_url":"https://api.github.com/repos/AmaranthineCodices/roact/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AmaranthineCodices/roact/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AmaranthineCodices/roact/teams","hooks_url":"https://api.github.com/repos/AmaranthineCodices/roact/hooks","issue_events_url":"https://api.github.com/repos/AmaranthineCodices/roact/issues/events{/number}","events_url":"https://api.github.com/repos/AmaranthineCodices/roact/events","assignees_url":"https://api.github.com/repos/AmaranthineCodices/roact/assignees{/user}","branches_url":"https://api.github.com/repos/AmaranthineCodices/roact/branches{/branch}","tags_url":"https://api.github.com/repos/AmaranthineCodices/roact/tags","blobs_url":"https://api.github.com/repos/AmaranthineCodices/roact/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AmaranthineCodices/roact/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AmaranthineCodices/roact/git/refs{/sha}","trees_url":"https://api.github.com/repos/AmaranthineCodices/roact/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AmaranthineCodices/roact/statuses/{sha}","languages_url":"https://api.github.com/repos/AmaranthineCodices/roact/languages","stargazers_url":"https://api.github.com/repos/AmaranthineCodices/roact/stargazers","contributors_url":"https://api.github.com/repos/AmaranthineCodices/roact/contributors","subscribers_url":"https://api.github.com/repos/AmaranthineCodices/roact/subscribers","subscription_url":"https://api.github.com/repos/AmaranthineCodices/roact/subscription","commits_url":"https://api.github.com/repos/AmaranthineCodices/roact/commits{/sha}","git_commits_url":"https://api.github.com/repos/AmaranthineCodices/roact/git/commits{/sha}","comments_url":"https://api.github.com/repos/AmaranthineCodices/roact/comments{/number}","issue_comment_url":"https://api.github.com/repos/AmaranthineCodices/roact/issues/comments{/number}","contents_url":"https://api.github.com/repos/AmaranthineCodices/roact/contents/{+path}","compare_url":"https://api.github.com/repos/AmaranthineCodices/roact/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AmaranthineCodices/roact/merges","archive_url":"https://api.github.com/repos/AmaranthineCodices/roact/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AmaranthineCodices/roact/downloads","issues_url":"https://api.github.com/repos/AmaranthineCodices/roact/issues{/number}","pulls_url":"https://api.github.com/repos/AmaranthineCodices/roact/pulls{/number}","milestones_url":"https://api.github.com/repos/AmaranthineCodices/roact/milestones{/number}","notifications_url":"https://api.github.com/repos/AmaranthineCodices/roact/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AmaranthineCodices/roact/labels{/name}","releases_url":"https://api.github.com/repos/AmaranthineCodices/roact/releases{/id}","deployments_url":"https://api.github.com/repos/AmaranthineCodices/roact/deployments","created_at":"2018-01-15T18:29:58Z","updated_at":"2018-01-15T18:29:59Z","pushed_at":"2018-02-02T00:25:26Z","git_url":"git://github.com/AmaranthineCodices/roact.git","ssh_url":"git@github.com:AmaranthineCodices/roact.git","clone_url":"https://github.com/AmaranthineCodices/roact.git","svn_url":"https://github.com/AmaranthineCodices/roact","homepage":"","size":70,"stargazers_count":0,"watchers_count":0,"language":"Lua","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Roblox:master","ref":"master","sha":"4b4679ce40c218228ad24c3fc589dc2a383a1365","user":{"login":"Roblox","id":4195619,"avatar_url":"https://avatars2.githubusercontent.com/u/4195619?v=4","gravatar_id":"","url":"https://api.github.com/users/Roblox","html_url":"https://github.com/Roblox","followers_url":"https://api.github.com/users/Roblox/followers","following_url":"https://api.github.com/users/Roblox/following{/other_user}","gists_url":"https://api.github.com/users/Roblox/gists{/gist_id}","starred_url":"https://api.github.com/users/Roblox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Roblox/subscriptions","organizations_url":"https://api.github.com/users/Roblox/orgs","repos_url":"https://api.github.com/users/Roblox/repos","events_url":"https://api.github.com/users/Roblox/events{/privacy}","received_events_url":"https://api.github.com/users/Roblox/received_events","type":"Organization","site_admin":false},"repo":{"id":109429829,"name":"roact","full_name":"Roblox/roact","owner":{"login":"Roblox","id":4195619,"avatar_url":"https://avatars2.githubusercontent.com/u/4195619?v=4","gravatar_id":"","url":"https://api.github.com/users/Roblox","html_url":"https://github.com/Roblox","followers_url":"https://api.github.com/users/Roblox/followers","following_url":"https://api.github.com/users/Roblox/following{/other_user}","gists_url":"https://api.github.com/users/Roblox/gists{/gist_id}","starred_url":"https://api.github.com/users/Roblox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Roblox/subscriptions","organizations_url":"https://api.github.com/users/Roblox/orgs","repos_url":"https://api.github.com/users/Roblox/repos","events_url":"https://api.github.com/users/Roblox/events{/privacy}","received_events_url":"https://api.github.com/users/Roblox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Roblox/roact","description":"A view management library for Roblox Lua like React","fork":false,"url":"https://api.github.com/repos/Roblox/roact","forks_url":"https://api.github.com/repos/Roblox/roact/forks","keys_url":"https://api.github.com/repos/Roblox/roact/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Roblox/roact/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Roblox/roact/teams","hooks_url":"https://api.github.com/repos/Roblox/roact/hooks","issue_events_url":"https://api.github.com/repos/Roblox/roact/issues/events{/number}","events_url":"https://api.github.com/repos/Roblox/roact/events","assignees_url":"https://api.github.com/repos/Roblox/roact/assignees{/user}","branches_url":"https://api.github.com/repos/Roblox/roact/branches{/branch}","tags_url":"https://api.github.com/repos/Roblox/roact/tags","blobs_url":"https://api.github.com/repos/Roblox/roact/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Roblox/roact/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Roblox/roact/git/refs{/sha}","trees_url":"https://api.github.com/repos/Roblox/roact/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Roblox/roact/statuses/{sha}","languages_url":"https://api.github.com/repos/Roblox/roact/languages","stargazers_url":"https://api.github.com/repos/Roblox/roact/stargazers","contributors_url":"https://api.github.com/repos/Roblox/roact/contributors","subscribers_url":"https://api.github.com/repos/Roblox/roact/subscribers","subscription_url":"https://api.github.com/repos/Roblox/roact/subscription","commits_url":"https://api.github.com/repos/Roblox/roact/commits{/sha}","git_commits_url":"https://api.github.com/repos/Roblox/roact/git/commits{/sha}","comments_url":"https://api.github.com/repos/Roblox/roact/comments{/number}","issue_comment_url":"https://api.github.com/repos/Roblox/roact/issues/comments{/number}","contents_url":"https://api.github.com/repos/Roblox/roact/contents/{+path}","compare_url":"https://api.github.com/repos/Roblox/roact/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Roblox/roact/merges","archive_url":"https://api.github.com/repos/Roblox/roact/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Roblox/roact/downloads","issues_url":"https://api.github.com/repos/Roblox/roact/issues{/number}","pulls_url":"https://api.github.com/repos/Roblox/roact/pulls{/number}","milestones_url":"https://api.github.com/repos/Roblox/roact/milestones{/number}","notifications_url":"https://api.github.com/repos/Roblox/roact/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Roblox/roact/labels{/name}","releases_url":"https://api.github.com/repos/Roblox/roact/releases{/id}","deployments_url":"https://api.github.com/repos/Roblox/roact/deployments","created_at":"2017-11-03T18:29:50Z","updated_at":"2018-01-31T19:34:23Z","pushed_at":"2018-02-01T19:52:02Z","git_url":"git://github.com/Roblox/roact.git","ssh_url":"git@github.com:Roblox/roact.git","clone_url":"https://github.com/Roblox/roact.git","svn_url":"https://github.com/Roblox/roact","homepage":"","size":60,"stargazers_count":18,"watchers_count":18,"language":"Lua","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2,"open_issues":14,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Roblox/roact/pulls/26"},"html":{"href":"https://github.com/Roblox/roact/pull/26"},"issue":{"href":"https://api.github.com/repos/Roblox/roact/issues/26"},"comments":{"href":"https://api.github.com/repos/Roblox/roact/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/Roblox/roact/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/Roblox/roact/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Roblox/roact/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/Roblox/roact/statuses/ed1cd2ac187b5c9bb57978b1ad7f29216eff7f89"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"AmaranthineCodices"}}