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
Neto
Neto9mo ago
the issue isnt trpc is react query
Neto
Neto9mo ago
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
ajay
ajayOP9mo ago
Thanks for help issue is now resolve
Want results from more Discord servers?
Add your server