Skip to content

Commit f12595a

Browse files
fix(docs): update quick-start.md (#342)
1 parent 778cc7a commit f12595a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/quick-start.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ TanStack DB is a reactive client store for building super fast apps. This exampl
1010
- **Mutate data** with instant optimistic updates
1111

1212
```tsx
13-
import { createCollection, useLiveQuery } from '@tanstack/react-db'
13+
import { createCollection, eq, useLiveQuery } from '@tanstack/react-db'
1414
import { queryCollectionOptions } from '@tanstack/query-db-collection'
1515

1616
// Define a collection that loads data using TanStack Query
@@ -36,7 +36,7 @@ function Todos() {
3636
// Live query that updates automatically when data changes
3737
const { data: todos } = useLiveQuery((q) =>
3838
q.from({ todo: todoCollection })
39-
.where(({ todo }) => !todo.completed)
39+
.where(({ todo }) => eq(todo.completed, false))
4040
.orderBy(({ todo }) => todo.createdAt, 'desc')
4141
)
4242

@@ -112,7 +112,7 @@ function TodoList() {
112112
// Basic filtering and sorting
113113
const { data: incompleteTodos } = useLiveQuery((q) =>
114114
q.from({ todo: todoCollection })
115-
.where(({ todo }) => !todo.completed)
115+
.where(({ todo }) => eq(todo.completed, false))
116116
.orderBy(({ todo }) => todo.createdAt, 'desc')
117117
)
118118

0 commit comments

Comments
 (0)