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

Apollo link subscription never stops => Can't perform a React state update on an unmounted component #7101

Closed
Torsten85 opened this issue Sep 30, 2020 · 2 comments

Comments

@Torsten85
Copy link
Contributor

Currently the subscription inside ApolloLink does not stop on unmounting a React Component or unsubscribing to a "watchQuery" subscription. (see #6985 for a more detailed explanation whats happening)

This also results in the warning Can't perform a React state update on an unmounted component.

Intended outcome:

The QueryManager should stop the subscription from ApolloLink

Actual outcome:

Subscription never gets stopped

How to reproduce the issue:

https://codesandbox.io/s/apollo-client-321-state-unmounted-7mhi8

Versions

@apollo/client: ^3.2.1 => 3.2.1

@jerelmiller
Copy link
Member

Hey @Torsten85! Thanks for the reproduction! Can you try this with the latest version (as of now its 3.7.1)? Using your codesandbox reproduction, I was able to update to the latest client version and no longer saw this issue.

@jerelmiller
Copy link
Member

Seeing as it seems to be working with the latest version, I'm going to go ahead and close this issue as I'm also trying to do a bit of housekeeping. If you have further questions or are still seeing issues after updating, please open this issue back up and we'd be happy to help!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants