diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-16 15:42:37 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-16 15:42:37 -0800 |
commit | 1952705dedd53041c1bcd39a3a04059ed5236ed6 (patch) | |
tree | 2632134b8a7c26632c9403deb372dcf847e9b996 | |
parent | 6dfb2a232f89e96c6cca25430afecbce50d08a0f (diff) | |
download | voidsky-1952705dedd53041c1bcd39a3a04059ed5236ed6.tar.zst |
Disable refetchOnWindowFocus on react-query (#1936)
-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, + }, + }, +}) |