{"action":"created","issue":{"url":"https://api.github.com/repos/drcmda/immer-wieder/issues/4","repository_url":"https://api.github.com/repos/drcmda/immer-wieder","labels_url":"https://api.github.com/repos/drcmda/immer-wieder/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/drcmda/immer-wieder/issues/4/comments","events_url":"https://api.github.com/repos/drcmda/immer-wieder/issues/4/events","html_url":"https://github.com/drcmda/immer-wieder/issues/4","id":374059619,"node_id":"MDU6SXNzdWUzNzQwNTk2MTk=","number":4,"title":"Child components can't setState in `componentDidMount`","user":{"login":"giannif","id":448767,"node_id":"MDQ6VXNlcjQ0ODc2Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/448767?v=4","gravatar_id":"","url":"https://api.github.com/users/giannif","html_url":"https://github.com/giannif","followers_url":"https://api.github.com/users/giannif/followers","following_url":"https://api.github.com/users/giannif/following{/other_user}","gists_url":"https://api.github.com/users/giannif/gists{/gist_id}","starred_url":"https://api.github.com/users/giannif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giannif/subscriptions","organizations_url":"https://api.github.com/users/giannif/orgs","repos_url":"https://api.github.com/users/giannif/repos","events_url":"https://api.github.com/users/giannif/events{/privacy}","received_events_url":"https://api.github.com/users/giannif/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-25T17:48:31Z","updated_at":"2018-10-29T20:09:54Z","closed_at":null,"author_association":"NONE","body":"A child component wrapped with `hoc` can't invoke setState in `componentDidMount` because [this.mounted](https://github.com/drcmda/immer-wieder/blob/master/src/index.js#L44) is false. \r\n\r\nI have a codesandbox demonstrating this, an action is invoked in `componentDidMount`, but the `setState` will not execute.\r\nhttps://codesandbox.io/s/9zonjjq3k4\r\n\r\nIf you have any ideas, I'm up for doing a pr. I'm not exactly sure why the `this.mounted` check is required\r\n\r\nGreat lib though :)"},"comment":{"url":"https://api.github.com/repos/drcmda/immer-wieder/issues/comments/434060427","html_url":"https://github.com/drcmda/immer-wieder/issues/4#issuecomment-434060427","issue_url":"https://api.github.com/repos/drcmda/immer-wieder/issues/4","id":434060427,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDA2MDQyNw==","user":{"login":"drcmda","id":2223602,"node_id":"MDQ6VXNlcjIyMjM2MDI=","avatar_url":"https://avatars0.githubusercontent.com/u/2223602?v=4","gravatar_id":"","url":"https://api.github.com/users/drcmda","html_url":"https://github.com/drcmda","followers_url":"https://api.github.com/users/drcmda/followers","following_url":"https://api.github.com/users/drcmda/following{/other_user}","gists_url":"https://api.github.com/users/drcmda/gists{/gist_id}","starred_url":"https://api.github.com/users/drcmda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drcmda/subscriptions","organizations_url":"https://api.github.com/users/drcmda/orgs","repos_url":"https://api.github.com/users/drcmda/repos","events_url":"https://api.github.com/users/drcmda/events{/privacy}","received_events_url":"https://api.github.com/users/drcmda/received_events","type":"User","site_admin":false},"created_at":"2018-10-29T20:09:54Z","updated_at":"2018-10-29T20:09:54Z","author_association":"OWNER","body":"well it is supposed to guard against async setState firing on a dead/unmounted component. PRs welcome of course!"}}
{"actor":{"display_login":"drcmda"}}