trpc auto refreshes page when I lose focus
Hi, i thought this was a development environment only configuration, but it does it even in production. How am I able to change this functionality?
3 Replies
It's a react query setting, can be changed globally in the QueryClient
Worth exploring the docs for that, it's 1 key, but there are several in the same vein
QueryClient | TanStack Query Docs
QueryClient
The QueryClient can be used to interact with a cache:
Hi. Thank you 🙂
I have found
refetchOnWindowFocus
which is what I am looking for. Here is my fix for any future people.
https://tanstack.com/query/v4/docs/react/guides/window-focus-refetching