Skip to content

Commit

Permalink
docs: useQuery to object syntax (#8387)
Browse files Browse the repository at this point in the history
* docs: useQuery to object syntax

* ci: apply automated fixes

---------

Co-authored-by: Dominik Dorfmeister <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 3, 2024
1 parent 73ec525 commit 8ccc36c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/framework/vue/guides/query-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ ref: docs/framework/react/guides/query-keys.md
```js
function useTodos(todoId) {
const queryKey = ['todos', todoId]
return useQuery(queryKey, () => fetchTodoById(todoId.value))
return useQuery({
queryKey,
queryFn: () => fetchTodoById(todoId.value),
})
}
```

Expand Down

0 comments on commit 8ccc36c

Please sign in to comment.