refetchInterval doesn't work with multiple useQuery usages #417
Replies: 4 comments 7 replies
-
As of today, it will take the shortest interval and only run that one interval as a least common denominator. Work is being done to support mixed intervals. |
Beta Was this translation helpful? Give feedback.
-
I'll consider this a feature request and move it to discussions. |
Beta Was this translation helpful? Give feedback.
-
That's interesting, looks like a bug to me. |
Beta Was this translation helpful? Give feedback.
-
Works as expected with 1.3.0 - https://codesandbox.io/s/busy-fast-nv7sx?file=/src/App.js Note, that I've changed returning value to string instead of date in query functions, since react-query doesn't compare dates properly (data comparison is a new feature in 1.3.0) |
Beta Was this translation helpful? Give feedback.
-
If my component uses multiple useQuery hooks, and each hook have refetchInterval configured, the interval doesn't seem to fire for all the 3 queries, but only for the first one.
Here the reproduced bug (open the console): https://codesandbox.io/s/exciting-fire-tyypj?file=/src/App.js
Beta Was this translation helpful? Give feedback.
All reactions