Unnecessary API'S call
I am facing a issue regarding unneccessary api calls when i switch to another tab and return to my local tab the same api's call hit again and again i am using tRPC first time
3 Replies
the issue isnt trpc
is react query
Window Focus Refetching | TanStack Query 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
Thanks for help issue is now resolve