You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can get a usePrefetch hook from an API resource and call the returning function during the mount lifecycle of my component to get the data into the redux state earlier so that subsequent useQuery calls and useLazyQuery calls return the cached data from the prefetch.
My question is, is the cached data fetched from the prefetch handler updated if the API has enabled refetchOnFocus or refetchOnReconnect, i.e. is a refetch triggered on refocus if the prefetch was the only fetch call so far that read from that specific resource?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I can get a
usePrefetch
hook from an API resource and call the returning function during the mount lifecycle of my component to get the data into the redux state earlier so that subsequentuseQuery
calls anduseLazyQuery
calls return the cached data from the prefetch.My question is, is the cached data fetched from the prefetch handler updated if the API has enabled
refetchOnFocus
orrefetchOnReconnect
, i.e. is a refetch triggered on refocus if the prefetch was the only fetch call so far that read from that specific resource?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions