From fd8938572fef6b8ea5b253b6b4f88333c6051621 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Mon, 17 Nov 2025 14:50:31 -0700 Subject: [PATCH] Small fixes to DB 0.5 blog post --- src/blog/tanstack-db-0.5-query-driven-sync.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/blog/tanstack-db-0.5-query-driven-sync.md b/src/blog/tanstack-db-0.5-query-driven-sync.md index 1fa4f78c1..8d7b40d93 100644 --- a/src/blog/tanstack-db-0.5-query-driven-sync.md +++ b/src/blog/tanstack-db-0.5-query-driven-sync.md @@ -105,7 +105,7 @@ With 0.5, you add one line to your collection: ```tsx const productsCollection = createCollection( - queryCollection({ + queryCollectionOptions({ queryKey: ['products'], queryFn: async (ctx) => { // Parse your query predicates into API parameters @@ -222,7 +222,7 @@ DB analyzes the join to determine exactly which related records are needed, then Query Collection integrates with TanStack Query's `staleTime` and `gcTime`: ```tsx -const productsCollection = createCollection(queryCollection({ +const productsCollection = createCollection(queryCollectionOptions({ queryKey: ['products'], queryFn: fetchProducts, staleTime: 5 * 60 * 1000, // 5 minutes @@ -251,7 +251,7 @@ That's progressive mode: load what you need immediately, sync everything in the ```tsx const todoCollection = createCollection( - electricCollection({ + electricCollectionOptions({ table: 'todos', syncMode: 'progressive', }) @@ -352,7 +352,7 @@ If you have ideas for new collection types based on Query-Driven Sync, please re ### Try it today ```bash -npm install @tanstack/react-db@0.5.0 +npm install @tanstack/react-db@latest ``` ---