Skip to content

Commit 2b1fb7b

Browse files
authored
Update tanstack-db-0.1-the-embedded-client-database-for-tanstack-query.md (#448)
Fix syntax
1 parent 7ea7a96 commit 2b1fb7b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/blog/tanstack-db-0.1-the-embedded-client-database-for-tanstack-query.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,10 @@ Instead of this:
277277

278278
```typescript
279279
// View-specific API call every time you navigate
280-
const { data: projectTodos } = useQuery(
281-
['project-todos', projectId],
282-
() => fetchProjectTodosWithUsers(projectId)
283-
)
280+
const { data: projectTodos } = useQuery({
281+
queryKey: ['project-todos', projectId],
282+
queryFn: () => fetchProjectTodosWithUsers(projectId)
283+
})
284284
```
285285

286286
You can do this:

0 commit comments

Comments
 (0)