refetchInterval doesn't work with multiple useQuery usages #417
Unanswered
pierissimo
asked this question in
General
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. |
0 replies
|
I'll consider this a feature request and move it to discussions. |
0 replies
|
That's interesting, looks like a bug to me. |
5 replies
|
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) |
2 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.
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
All reactions