After upgrading to v0.65.1 i get the following warning on iOS. EventEmitter.removeListener('url', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `EventEmitter.addListener`.
See original GitHub issueDescription
This warning appeared after upgrading from react native 0.64.2 to 0.65.1
React Native version:
info Fetching system and libraries information...
System:
OS: macOS 11.5.2
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 50.48 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node
Yarn: 1.19.1 - ~/.yvm/versions/v1.19.1/bin/yarn
npm: 6.12.1 - ~/.nvm/versions/node/v12.13.1/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK:
API Levels: 23, 26, 28, 29, 30
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2
System Images: android-26 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7042882
Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_212 - /usr/bin/javac
npmPackages:
@react-native-community/cli: 5.0.1 => 5.0.1
react: 17.0.2 => 17.0.2
react-native: 0.65.1 => 0.65.1
react-native-macos: Not Found
npmGlobalPackages:
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- create a debug build
- run the app on simulator
- enable debug mode
Expected Results
Not throw any warning
Snack, code example, screenshot, or link to a repository:
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:9
Top Results From Across the Web
React Native Warning: Receiving warning from the console
removeListener (\'change\', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `EventEmitter.
Read more >react-native-codegen | Yarn - Package Manager
Changelog. v0.70.3. Fixed. Stop styles from being reset when detaching Animated.Values in old renderer (2f58e52006 by @javache) ...
Read more >React Native - EventEmitter removeListener Method has been ...
Method has been deprecated. Please instead use remove() on the subscription returned by EventEmitter.addListener .
Read more >react-native/CHANGELOG.md - UNPKG
89, - Upgrade deprecated-react-native-prop-types dependency ... Instead, use the `remove()` method on the subscription object returned by `addListener`.
Read more >How to use removeListener function in EventEmitter - Tabnine
Remove event listener * @param {String} event - Event name * @param ... removeListener.apply(this.emitter, arguments); //Return object so it can be chained ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
after upgrading “@react-navigation/native” to “5.9.8” the issue resolved
Yet the method signature for
AppState.addEventListener
hasvoid
as return type.