Even if the cache time is 0, the cache is used for the same query. #4580
Answered
by
TkDodo
kubota-precena
asked this question in
Q&A
-
I created a simple sample code.
When I click the toggle button, component A is unmounted, so I would like to think it is refetched, but it is not. What can be done about this problem? We do not want to reset explicitly. |
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
Dec 1, 2022
Replies: 1 comment
-
there is no render cycle where if you don't want to show stale data, you can check for |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
kubota-precena
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
there is no render cycle where
useFooQuery
becomes inactive / unused, so the cached entry is not eligible for garbage collection.if you don't want to show stale data, you can check for
isFetchedAfterMount
and only showdata
when this flag istrue
.