-
-
Notifications
You must be signed in to change notification settings - Fork 21
Prevent a React dev warning when a loading Query component is unmounted #10
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
Labels
bug
Something isn't working
Comments
I'm doing a thing where I use the |
Yep, it's annoying but at least harmless. I hope to be able to get to it this weekend; I've recently been busy soft-launching https://enamor.app (which BTW happens to use |
🚢 Fixed in v3. |
RyanWooldridge
added a commit
to RyanWooldridge/React-graphql
that referenced
this issue
Aug 21, 2019
denisp22
pushed a commit
to denisp22/graphql-react
that referenced
this issue
Jul 27, 2023
DevHawkNov
added a commit
to DevHawkNov/GraphQL_React
that referenced
this issue
Feb 4, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you unmount a
Query
component (specifically theGraphQLQuery
component within it) while it is still loading a query, you see a React dev warning like this:This is because a
setState
call happens after the request is complete to update the loading state asfalse
, see here. This should be prevented from happening after the component has unmounted.The text was updated successfully, but these errors were encountered: