Bypass cache even while data is refetched #6656
-
What I'm trying to accomplishI want to make a More infoI have a specific React component where I do not want to use cached data at all. Setting Additional backgroundWithin a component, I display a modal based on the value of the queried data. Stale cached data causes the modal to appear when it should not. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
you can use https://tanstack.com/query/latest/docs/react/reference/useQuery
|
Beta Was this translation helpful? Give feedback.
you can use
isFetchedAfterMount
. From the docs:https://tanstack.com/query/latest/docs/react/reference/useQuery