diff options
Diffstat (limited to 'src/lib/react-query.ts')
-rw-r--r-- | src/lib/react-query.ts | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/react-query.ts b/src/lib/react-query.ts index 2a8f1d759..6b425d3b4 100644 --- a/src/lib/react-query.ts +++ b/src/lib/react-query.ts @@ -1,3 +1,13 @@ import {QueryClient} from '@tanstack/react-query' -export const queryClient = new QueryClient() +export const queryClient = new QueryClient({ + defaultOptions: { + queries: { + // NOTE + // refetchOnWindowFocus breaks some UIs (like feeds) + // so we NEVER want to enable this + // -prf + refetchOnWindowFocus: false, + }, + }, +}) |