-
Hi. With the default configuration, after the window has lost focus, when an user clicks on a page on and triggers an action that remove some queries from the current page (link to another page, selection of another tab, ...), these queries are being uselessly refreshed, as per the 'refetchOnWindowFocus' property. Disactivating this property, of course, disables the purpose of this very feature if the user clicks on a "neutral" section of the page which does not 'unmount' these queries. What about a setting a mode on this 'refetchOnWindowFocus' property, like 'deferred', which executes the current logic only in a 'deferred way' (like in the "process.nextTick"), after having given the opportunity for components to unmount on the click so that the related queries are not being refreshed anymore, and keep the benefit of 'refetchOnWindowFocus' if they did not unmount ? Thanks a lot for your feedbacks ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
in v5, refetchOnWindowFocus will only trigger when a page actually becomes visible, not if it becomes focussed. I think this will implicitly fix this issue, because you just focussing the window while clicking onto it will not trigger a refetch anyways. |
Beta Was this translation helpful? Give feedback.
in v5, refetchOnWindowFocus will only trigger when a page actually becomes visible, not if it becomes focussed. I think this will implicitly fix this issue, because you just focussing the window while clicking onto it will not trigger a refetch anyways.