about summary refs log tree commit diff
path: root/src/lib/react-query.ts
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2023-11-29 04:48:08 +0000
committerGitHub <noreply@github.com>2023-11-28 20:48:08 -0800
commit9fb2c29c672f6be07410ae1ca4d7e47b6c98f914 (patch)
tree7d31e83c09595d326d09e788308e0633f9336340 /src/lib/react-query.ts
parent6f7032d42b85298b95f9a55d2dd4809450c6fa64 (diff)
downloadvoidsky-9fb2c29c672f6be07410ae1ca4d7e47b6c98f914.tar.zst
Disable RQ structural sharing (#2022)
Diffstat (limited to 'src/lib/react-query.ts')
-rw-r--r--src/lib/react-query.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/react-query.ts b/src/lib/react-query.ts
index 6b425d3b4..9886e87be 100644
--- a/src/lib/react-query.ts
+++ b/src/lib/react-query.ts
@@ -8,6 +8,10 @@ export const queryClient = new QueryClient({
       // so we NEVER want to enable this
       // -prf
       refetchOnWindowFocus: false,
+      // Structural sharing between responses makes it impossible to rely on
+      // "first seen" timestamps on objects to determine if they're fresh.
+      // Disable this optimization so that we can rely on "first seen" timestamps.
+      structuralSharing: false,
     },
   },
 })