From 8ccc36c82a42b74d769cea59f9a7e690bd7e2d98 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 3 Dec 2024 15:43:25 +0800 Subject: [PATCH] docs: useQuery to object syntax (#8387) * docs: useQuery to object syntax * ci: apply automated fixes --------- Co-authored-by: Dominik Dorfmeister Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- docs/framework/vue/guides/query-keys.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/framework/vue/guides/query-keys.md b/docs/framework/vue/guides/query-keys.md index a09aa36443..bb4a89571f 100644 --- a/docs/framework/vue/guides/query-keys.md +++ b/docs/framework/vue/guides/query-keys.md @@ -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), + }) } ```