2 Replies
Window Focus Refetching | TanStack Query React Docs
If a user leaves your application and returns and the query data is stale, TanStack Query automatically requests fresh data for you in the background. You can disable this globally or per-query using the refetchOnWindowFocus option:
Disabling Globally
I remember it was a simple setting, so it was not constantly fetching trpc when user focus and unfocus the screen