Replies: 1 comment
-
please show a minimal, runnable reproduction with stackblitz or codesandbox |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My page has different sections. When I unmount and then re-mount a section, for example, Home.tsx, the posts from usePaginatedPosts (custom hook) are re-fetched, instead of using the ones from cache. I don't understand why Tanstack Query is re-fetching all the posts instead of using the ones in cache.
usePaginatedPosts.ts:
main.tsx:
I tried by changing values like staleTime or gcTime, but is all the same. I also tried creating a QueryCache and by using persistQueryClient, but it also doesn't work.
Beta Was this translation helpful? Give feedback.
All reactions