useQuery vs useInfiniteQuery on mount/unmount #3677
Unanswered
tamis-laan
asked this question in
Q&A
Replies: 1 comment
-
It shouldn't be different. Please show a codesandbox reproduction |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using a
useQuery
anduseInfiniteQuery
in two different components. The components are mounted and unmounted when navigating to and when navigating away from a screen that include these components.The
useQuery
does not refetch the data on unmount->mount while theuseInfiniteQuery
does refetch the data. Both queries use a stale time ofstaleTime: 20*60*1000
20 minutes.Why does this behavior differ??
Beta Was this translation helpful? Give feedback.
All reactions