-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Bug report
Description / Observed Behavior
What kind of issues did you encounter with SWR?
Data isn't revalidating when certain browser extensions are installed. One I know for certain is UI.Vision RPA. It appears to hold up requestIdleCallback
from ever being called.
Expected Behavior
How did you expect SWR to behave here?
It would revalidate the data appropriately.
Repro Steps / Code Example
Or share your code snippet or a CodeSandbox link is also appreciated!
You should be able to test this with any code that tries to revalidate directly from useSWR
(mutate
will push a revalidation through). This doesn't work in CodeSandbox, due to the sandbox.
One way to get around this is to specify the timeout
option for requestIdleCallback
. I did this locally just to see if it would work, and it did. I just don't know what the default for that should be.
Additional Context
SWR version. 0.3.6
Add any other context about the problem here.