Refetch on window focus
Hi. So i noticed something when I switched from v3 to v5. My queries don't auto refetch whenever the browser window is refocused. The docs say that is the default behaviour and switching back to v3 solves the issue. Is there some new configuration for this that I'm missing?
2 Replies
genetic-orange•2y ago
It still refetches but not in the focus event, but in the visibilitychange event. You can setup a custom event handler but usually the current default is more likely what you want
magic-amberOP•2y ago
Ooh, that makes sense. I had both my vscode and browser windows on screen so the browser window was still 'visible' even though the focus was shifting between the two. 😄 Thanks for the response.