Skip to content

Commit fd89385

Browse files
authored
Small fixes to DB 0.5 blog post
1 parent a42a0a0 commit fd89385

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/blog/tanstack-db-0.5-query-driven-sync.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ With 0.5, you add one line to your collection:
105105

106106
```tsx
107107
const productsCollection = createCollection(
108-
queryCollection({
108+
queryCollectionOptions({
109109
queryKey: ['products'],
110110
queryFn: async (ctx) => {
111111
// Parse your query predicates into API parameters
@@ -222,7 +222,7 @@ DB analyzes the join to determine exactly which related records are needed, then
222222
Query Collection integrates with TanStack Query's `staleTime` and `gcTime`:
223223

224224
```tsx
225-
const productsCollection = createCollection(queryCollection({
225+
const productsCollection = createCollection(queryCollectionOptions({
226226
queryKey: ['products'],
227227
queryFn: fetchProducts,
228228
staleTime: 5 * 60 * 1000, // 5 minutes
@@ -251,7 +251,7 @@ That's progressive mode: load what you need immediately, sync everything in the
251251

252252
```tsx
253253
const todoCollection = createCollection(
254-
electricCollection({
254+
electricCollectionOptions({
255255
table: 'todos',
256256
syncMode: 'progressive',
257257
})
@@ -352,7 +352,7 @@ If you have ideas for new collection types based on Query-Driven Sync, please re
352352
### Try it today
353353

354354
```bash
355-
npm install @tanstack/react-db@0.5.0
355+
npm install @tanstack/react-db@latest
356356
```
357357

358358
---

0 commit comments

Comments
 (0)