You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like it to keep fresh if the user still uses the window but is invalidated after focusing.
However, if I set the refetchOnWindowFocus to always, the data is updating no matter if the modal is open. I don't want it to fetch data if the data is not mounted.
How can I invalidate a query on the window focus?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I have a query about a list of options on a modal like this. Most of the time the modal is not opened.
I would like it to keep fresh if the user still uses the window but is invalidated after focusing.
However, if I set the
refetchOnWindowFocus
to always, the data is updating no matter if the modal is open. I don't want it to fetch data if the data is not mounted.How can I invalidate a query on the window focus?
Beta Was this translation helpful? Give feedback.
All reactions