How does refreshInterval work under the hood? #2459
Unanswered
casper-fernandes
asked this question in
Q&A
Replies: 0 comments
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.
-
I have a use case where I need to call an API every minute, even if the page is out of focus.
Global swr config:
dedupingInterval: 10000
Local function swr config:
refreshInterval: 60000
revalidateOnFocus: false
With the above config, swr wokrs fine as long as Im on the page. But when I switch tabs and am out of focus for longer than the refreshInterval, and come back, it takes some time for my revalidation to occur
Beta Was this translation helpful? Give feedback.
All reactions