about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/lib/react-query.ts12
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,
+    },
+  },
+})