useQuery refetch { data } lifecycle #5181
-
If a useQuery returns data on the initial load and stores it in Would running a refetch with Thanks so much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi 👋 The data that exists in the cache will still be returned by the query if it refetches erroneously. Marking a query as stale via Hopefully this helps (also, apologies for accidentally closing the discussion; it was an accident!) 🙂 |
Beta Was this translation helpful? Give feedback.
Hi 👋
The data that exists in the cache will still be returned by the query if it refetches erroneously. Marking a query as stale via
invalidateQueries
will exhibit the same behaviour if the query subsequently refetched erroneously.Hopefully this helps (also, apologies for accidentally closing the discussion; it was an accident!) 🙂