You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the example sandbox, i have two components. One uses useQuery with key posts to fetch the posts, and the other one uses useMutation to add the new post and invalidate previous posts queries from the success callback.
The data associated with posts key seems to be updating in the store after query invalidation. (you can check it from the devtools)
But the component that consumed posts query does not seem to re-render for some reason.
Open dev tools. (look at the posts query key's data)
Click add post (this adds a new post and invalidates posts queries)
Expected behavior
The data associated with posts key updates in the devtools. Hence a rerender in the component consuming posts is expected. But it clearly is not happening in this case.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
OS: Macos
Browser: Brave
Tanstack Query adapter
react-query
TanStack Query version
5.64.2
TypeScript version
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
In the example sandbox, i have two components. One uses
useQuery
with keyposts
to fetch the posts, and the other one usesuseMutation
to add the new post and invalidate previousposts
queries from the success callback.The data associated with
posts
key seems to be updating in the store after query invalidation. (you can check it from the devtools)But the component that consumed
posts
query does not seem to re-render for some reason.Your minimal, reproducible example
https://codesandbox.io/p/sandbox/hqq66p
Steps to reproduce
posts
query key's data)posts
queries)Expected behavior
The data associated with
posts
key updates in the devtools. Hence a rerender in the component consumingposts
is expected. But it clearly is not happening in this case.How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
OS: Macos
Browser: Brave
Tanstack Query adapter
react-query
TanStack Query version
5.64.2
TypeScript version
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: