{"action":"opened","issue":{"url":"https://api.github.com/repos/andyyou/react-coverflow/issues/40","repository_url":"https://api.github.com/repos/andyyou/react-coverflow","labels_url":"https://api.github.com/repos/andyyou/react-coverflow/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/andyyou/react-coverflow/issues/40/comments","events_url":"https://api.github.com/repos/andyyou/react-coverflow/issues/40/events","html_url":"https://github.com/andyyou/react-coverflow/issues/40","id":310346950,"number":40,"title":"resize listener produces error if component is unmounted/remounted","user":{"login":"phillipkerman","id":543856,"avatar_url":"https://avatars0.githubusercontent.com/u/543856?v=4","gravatar_id":"","url":"https://api.github.com/users/phillipkerman","html_url":"https://github.com/phillipkerman","followers_url":"https://api.github.com/users/phillipkerman/followers","following_url":"https://api.github.com/users/phillipkerman/following{/other_user}","gists_url":"https://api.github.com/users/phillipkerman/gists{/gist_id}","starred_url":"https://api.github.com/users/phillipkerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillipkerman/subscriptions","organizations_url":"https://api.github.com/users/phillipkerman/orgs","repos_url":"https://api.github.com/users/phillipkerman/repos","events_url":"https://api.github.com/users/phillipkerman/events{/privacy}","received_events_url":"https://api.github.com/users/phillipkerman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-01T19:20:03Z","updated_at":"2018-04-01T19:20:03Z","closed_at":null,"author_association":"NONE","body":"Issue:\r\nI'm getting an error when I resize (if the component is unmounted/remounted):\r\n`Uncaught Error: Unable to find node on an unmounted component.\r\n    at invariant (invariant.js:42)\r\n    at findCurrentFiberUsingSlowPath (react-dom.development.js:3552)\r\n    at findCurrentHostFiber (react-dom.development.js:3621)\r\n    at Object.findHostInstance (react-dom.development.js:12611)\r\n    at Object.findDOMNode (react-dom.development.js:16395)\r\n    at RadiumEnhancer.updateDimensions (CoverFlow.js:124)`\r\n\r\nReproduce:\r\n1. use CoverFlow inside a component.\r\n2. remove container component (confirm componentWillUnmount occurs)\r\n3. curiously, notice CoverFlow DOES execute: window.removeEventListener('resize', this.updateDimensions.bind(this));\r\n4 resize the browser window now that the CoverFlow is gone.  \r\n5. see error above.\r\n\r\nI could avoid the issue by never adding the resize to begin with--that is, comment out:\r\nwindow.addEventListener('resize', this.updateDimensions.bind(this));\r\n\r\nPlease tell me if there's something I can do to help.\r\n"}}
{"actor":{"display_login":"phillipkerman"}}