How to tell current data is from cache in useQuery (v3)? #1453
Unanswered
yann-combarnous
asked this question in
Q&A
Replies: 1 comment 5 replies
-
This really sounds like the default behavior of react query. isLoading should only be true on a „hard loading“ when there is no data on the cache |
Beta Was this translation helpful? Give feedback.
5 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 am using useQuery and want to display a loading indicator when:
So when the data is in cache (inactive), it will be displayed first and refreshed silently in the background.
But when it is not in cache, I want to be able to display a loading spinner.
I tried all the properties, but could not find any way to achieve this, help?
Beta Was this translation helpful? Give feedback.
All reactions