Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/blog/tanstack-db-0.5-query-driven-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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-[email protected]
npm install @tanstack/[email protected]
```

---
Expand Down