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

Can't call setState on an unmounted component #97

Open
novalain opened this issue Aug 6, 2018 · 0 comments
Open

Can't call setState on an unmounted component #97

novalain opened this issue Aug 6, 2018 · 0 comments

Comments

@novalain
Copy link

novalain commented Aug 6, 2018

Hey! It currently seems like some async operation in the component is not being properly canceled when unmounted.

Expected Behavior

No warnings.

Current Behavior

Warning: Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.

Possible Solution

Cancel all subscriptions/async operations in the internal componentWillUnmount

Steps to Reproduce

o Include the minimal component from the samples
o Watch the warning appear on Android and iOS

Thanks!

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

No branches or pull requests

1 participant