invalidateQueries stops working if I navigate between Next.js routes #3037
-
We used Now if I navigate from one route to another and then go back, queryClient.invalidateQueries(someQueryKey) stops working, all other query calls work as it should useQueris and useMutations . What weird, when I navigate between the pages queries disappear from I'd really appreciate if anyone can help me with this issue! Let me know if any additional info is required. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You really need to show the code. My best guess is you create a new QueryClient on every page transition, which basically throws away the old cache. |
Beta Was this translation helpful? Give feedback.
You really need to show the code. My best guess is you create a new QueryClient on every page transition, which basically throws away the old cache.