-3est[P]-
-3est[P]-4w ago

v11 with tanstack mutation not invalidate query

When the mutation is successful and the router switches to the dashboard, sometimes the data refreshes, but other times it does not. However, if I press Alt + Tab, the data refreshes.
No description
No description
3 Replies
-3est[P]-
-3est[P]-OP4w ago
ok i'm fixed it replace all useQuery to useSuspenseQuery and prefetch
Nick
Nick4w ago
Looks like you're using queryKey as the queryKey when queryKey() gives you the query key. I'm surprised TSC doesn't complain about that
-3est[P]-
-3est[P]-OP4w ago
thank it queryKey()

Did you find this page helpful?