refetchInterval triggered multiple times. #7823
Unanswered
ibrahim-ytl
asked this question in
General
Replies: 1 comment 1 reply
-
we call the function a lot internally to calculate the interval. Timers need to be re-calculated every time options update / new data comes in etc. This can happen on every render. It's a pure function so it shouldn't matter to you how often we call it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, below is my code using the
refetchInterval
:I have 2 console.log. One is inside the queryFn and another one is at refetchInterval. I notice that the console.log inside the refetchInterval get called first. Not only that it was called multiple times before the console.log inside the queryFn get executed. I am trying to understand what is going on here. Can anyone clarify this?
Beta Was this translation helpful? Give feedback.
All reactions