{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/18921","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/18921/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/18921/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/18921/events","html_url":"https://github.com/facebook/react-native/issues/18921","id":315503275,"number":18921,"title":"Warning: isMounted(...) is deprecated when use NativeMethodsMixin","user":{"login":"AndreiCalazans","id":20777666,"avatar_url":"https://avatars1.githubusercontent.com/u/20777666?v=4","gravatar_id":"","url":"https://api.github.com/users/AndreiCalazans","html_url":"https://github.com/AndreiCalazans","followers_url":"https://api.github.com/users/AndreiCalazans/followers","following_url":"https://api.github.com/users/AndreiCalazans/following{/other_user}","gists_url":"https://api.github.com/users/AndreiCalazans/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreiCalazans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreiCalazans/subscriptions","organizations_url":"https://api.github.com/users/AndreiCalazans/orgs","repos_url":"https://api.github.com/users/AndreiCalazans/repos","events_url":"https://api.github.com/users/AndreiCalazans/events{/privacy}","received_events_url":"https://api.github.com/users/AndreiCalazans/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-18T14:25:22Z","updated_at":"2018-04-19T13:05:39Z","closed_at":null,"author_association":"NONE","body":"## Environment\r\n  OS: macOS High Sierra 10.13.4\r\n  Node: 9.4.0\r\n  Yarn: 1.3.2\r\n  npm: 5.6.0\r\n  Watchman: 4.7.0\r\n  Xcode: Xcode 9.2 Build version 9C40b\r\n  Android Studio: 2.3 AI-162.4069837\r\n\r\nPackages: (wanted => installed)\r\n  react: 16.3.1 => 16.3.1\r\n  react-native: 0.55.1 => 0.55.1\r\n\r\n## Steps to Reproduce\r\n\r\n\r\nUse the following in your React Native code.\r\n\r\n**rendered element:**\r\n``` <View ref={e => this.renderedElement = e}>```\r\n \r\n```\r\nimport NativeMethodsMixin from 'NativeMethodsMixin';\r\n\r\nNativeMethodsMixin.measureInWindow.call(this.renderedElement, (x, y, width, height) => {\r\n        this.setState({ xOffset: x, yOffset: y, elementWidth: width, elementHeight: height });\r\n      });\r\n```\r\n\r\n\r\n## Expected Behavior\r\n   Get layout information from referenced component without warnings.\r\n\r\n## Actual Behavior\r\n  It is throwing the following warning.\r\n\r\n\r\n```\r\nWarning: isMounted(...) is deprecated in plain JavaScript React classes. Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/382727030","html_url":"https://github.com/facebook/react-native/issues/18921#issuecomment-382727030","issue_url":"https://api.github.com/repos/facebook/react-native/issues/18921","id":382727030,"user":{"login":"FredyC","id":1096340,"avatar_url":"https://avatars0.githubusercontent.com/u/1096340?v=4","gravatar_id":"","url":"https://api.github.com/users/FredyC","html_url":"https://github.com/FredyC","followers_url":"https://api.github.com/users/FredyC/followers","following_url":"https://api.github.com/users/FredyC/following{/other_user}","gists_url":"https://api.github.com/users/FredyC/gists{/gist_id}","starred_url":"https://api.github.com/users/FredyC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FredyC/subscriptions","organizations_url":"https://api.github.com/users/FredyC/orgs","repos_url":"https://api.github.com/users/FredyC/repos","events_url":"https://api.github.com/users/FredyC/events{/privacy}","received_events_url":"https://api.github.com/users/FredyC/received_events","type":"User","site_admin":false},"created_at":"2018-04-19T13:05:39Z","updated_at":"2018-04-19T13:05:39Z","author_association":"NONE","body":"Well, that was the intention 🤡  Obviously, the `isMounted` is totally legacy API coming from the age of `React.createClass`. Also if you actually read [release notes](https://github.com/react-native-community/react-native-releases/blob/master/CHANGELOG.md#054), you will understand why my solution is a correct one...\r\n\r\n![image](https://user-images.githubusercontent.com/1096340/38993131-0c68689e-43e3-11e8-8dc9-a398d23334e8.png)\r\n\r\n\r\n"}}
{"actor":{"display_login":"FredyC"}}