Tracking ongoing refetch attempts in useQueries' refetchInterval
Hey everyone!
I have a function inside
Until all the refetch attempts are done, I need to keep showing a spinner.
From what I’ve checked, when
Is there a way to detect if the query still has remaining
Thanks in advance!
I have a function inside
useQueries's refetchInterval that refetches a query up to three times based on certain conditions.Until all the refetch attempts are done, I need to keep showing a spinner.
From what I’ve checked, when
refetchInterval runs, isFetching is true, and if it succeeds, isSuccess is also true. But between refetch attempts, the query goes into an idle state, so I can’t rely on any flag to track ongoing attempts.Is there a way to detect if the query still has remaining
refetchInterval attempts so I can use that to show the spinner?Thanks in advance!