()
| 440 | } |
| 441 | |
| 442 | const tick = () => { |
| 443 | if (pauseWhenIdle && !isUserActive(idleThreshold)) { |
| 444 | wasIdleRef.current = true |
| 445 | return |
| 446 | } |
| 447 | if (isEntryStale(serializedKey, staleTime)) { |
| 448 | void doFetch() |
| 449 | } |
| 450 | } |
| 451 | |
| 452 | intervalRef.current = setInterval(tick, refetchInterval) |
| 453 | return () => { |
nothing calls this directly
no test coverage detected