question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EventEmitter.removeListener('change', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `EventEmitter.addListener`.

See original GitHub issue

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest React Native release to make sure your issue has not already been fixed: https://reactnative.dev/docs/upgrading.html

React Native version:

Run react-native info in your terminal and copy the results here.

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

Expected Results

Describe what you expected to happen.

Snack, code example, screenshot, or link to a repository:

Please provide a Snack (https://snack.expo.io/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
ca057commented, Sep 30, 2021

I was having a similar issue, however, whenever I updated my side effects to use the .remove() method, TypeScript says,

Property ‘remove’ does not exist on type ‘void’.ts(2339)

Screen Shot 2021-09-29 at 11 51 47 AM

Any idea of what I can do to make TS happy?

Have you updated to the latest types of React Native? @types/react-native@0.65.1 works for me.

2reactions
AhmedAbuelenincommented, Mar 3, 2022

Having the same warning in react-native 0.67.3, any idea how to fix this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EventEmitter.removeListener('change', ...): Method ... - GitHub
removeListener ('change', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `EventEmitter.addListener`.
Read more >
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 - EventEmitter removeListener Method has been ...
Method has been deprecated. Please instead use remove() on the subscription returned by EventEmitter.addListener .
Read more >
Dimensions - React Native
removeEventListener () ​ ... Deprecated. Use the remove() method on the event subscription returned by addEventListener() . set() ​. static ...
Read more >
ServiceReceiver interface | Microsoft Learn
Returns true if the event had listeners, false otherwise. JavaScript. Copy. const EventEmitter = require('events'); const myEmitter = new EventEmitter(); ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found