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: set isMounted to true when remounted #9561

Merged

Conversation

devpeerapong
Copy link
Contributor

@devpeerapong devpeerapong commented Mar 28, 2022

Checklist:

  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests

React 18 StrictMode invokes effects twice causing isMounted to be false immediately after the component is mounted causing the MutationResult to not be updated
This PR fix that by reset isMounted to true whenever the effect is run.

#9560

Copy link
Member

@benjamn benjamn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @devpeerapong, and sorry for the wait!

@benjamn benjamn changed the base branch from main to release-3.6 April 26, 2022 14:01
@benjamn benjamn added this to the Release 3.6 milestone Apr 26, 2022
@benjamn benjamn merged commit 95ec974 into apollographql:release-3.6 Apr 26, 2022
benjamn added a commit that referenced this pull request Apr 26, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants