-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
staleTime and suspense true incompatible #1116
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
Comments
I guess, even if after click on 'details' the query is unmounted and becomes inactive. (if |
i think it is related to this #1059 if you set |
thanks for the link to an issue, it seems to be related, I agree. |
Should be fixed now in v3: https://react-query-beta.tanstack.com/ . Closing this issue in favor of #1059 |
Describe the bug
useQuery does not pay attention to 'staleTime' to re-invoke the async callback if 'suspense' is set to 'true'.
To Reproduce
Expected behavior
When a component with this query is remounted after 5 seconds (5000 milliseconds), it should re-invoke someAsyncFn() to re-fetch the data.
The text was updated successfully, but these errors were encountered: