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

Improve unsubscription #48

Merged
merged 3 commits into from
Feb 22, 2020
Merged

Conversation

pistou
Copy link
Contributor

@pistou pistou commented Dec 6, 2019

This is to prevent the usual Warning

Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application.

Summary

I had a memory leak warning with the previous code, and opened a StackOverflow question to solve it.
I ended doing my own hook based on this code to solve the warning.

Compatibility

OS Implemented
iOS
Android

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I mentioned this change in CHANGELOG.md
  • I updated the typed files (TS and Flow)
  • I added a sample use of the API in the example project (example/App.js)

This is to prevent the usual Warning "Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application."
@pvinis
Copy link
Member

pvinis commented Feb 16, 2020

Is this still something that needs fixing?

@pvinis pvinis added patch Increment the patch version when merged release Create a release when this pr is merged labels Feb 22, 2020
@pvinis pvinis merged commit e448290 into react-native-community:master Feb 22, 2020
@pvinis
Copy link
Member

pvinis commented Mar 16, 2020

🚀 PR was released in v2.4.4 🚀

@pvinis pvinis added the released This issue/pull request has been released. label Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged release Create a release when this pr is merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants