Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: addListener and removeListeners methods wass added to pass warning with Native Event Emitter #1036

Merged
merged 1 commit into from
Feb 4, 2022

Conversation

TickKleiner
Copy link
Contributor

While working with the module for uploading files to the server, I encountered the warnings given in the screenshots: in Metro; in_app_1; in_app_2; in_app_3
They did not interfere with the operation of the module, but they were very annoying.
I'm not very good at java and writing native modules, but based on the solution i found in the reanimated: this fix. I added the required methods to the RNFSManager.

@ghost
Copy link

ghost commented Oct 21, 2021

Can we have this merged?

@calebmackdavenport
Copy link

calebmackdavenport commented Nov 10, 2021

@itinance this is all that's required to suppress this warning.
Following the lead of react-native-netinfo, we just need this stub on Android, not on iOS.
RNFS is already properly handling the event listener removal, but here's how firebase did it if it's helpful to cross examine.

@joalisonpereira
Copy link

While working with the module for uploading files to the server, I encountered the warnings given in the screenshots: in Metro; in_app_1; in_app_2; in_app_3 They did not interfere with the operation of the module, but they were very annoying. I'm not very good at java and writing native modules, but based on the solution i found in the reanimated: this fix. I added the required methods to the RNFSManager.

This fix helped me, please merge

@cheungpat
Copy link

@itinance I saw this warning too and this PR fixes the problem for me. Can you help take a look and see if this PR is missing anything?

This is the commit in react-native where this warning is shown:
facebook/react-native@114be1d

The warning is added since v0.65.0.

@itinance itinance merged commit 01952b4 into itinance:master Feb 4, 2022
@professorkolik
Copy link

@itinance When can we expect this PR to be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants