Skip to content
Discussion options

You must be logged in to vote

Invalidating a query marks the query as stale and React Query will automatically re-fetch that query as a result. So even if you invalidate a query hard loading will not occur because any subsequent query of the same instance is happening in the backgound for great UX. If you want to show loading state whenever data is being fetched you'll need to use isFetching instead of isLoading. I hope this helps!

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by DoneDeal0
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants