Replies: 1 comment 2 replies
-
You probably need to move the condition within the function. Otherwise you are always passing a function what always returns false or always returns true |
Beta Was this translation helpful? Give feedback.
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.
-
I'm conditionally passing
refetchOnWindowFocus
andrefetchOnReconnect
as() => true
or() => false
.And if I focus the page it still loads data.
An additional check is required inside
useEventListener
to see ifrefetchOnWindowFocus
/refetchOnReconnect
doesn't actually returnfalse
.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions