From ac0e2e67404c1d31deb102fc976386e20d176332 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 3 Dec 2024 10:19:07 +0800 Subject: [PATCH 1/2] docs: useQuery to object syntax --- 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..9da9f25fd6 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) + }) } ``` From b358773046c6bedfb714845f433810cac824ae5b Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 07:38:29 +0000 Subject: [PATCH 2/2] ci: apply automated fixes --- docs/framework/vue/guides/query-keys.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/framework/vue/guides/query-keys.md b/docs/framework/vue/guides/query-keys.md index 9da9f25fd6..bb4a89571f 100644 --- a/docs/framework/vue/guides/query-keys.md +++ b/docs/framework/vue/guides/query-keys.md @@ -11,7 +11,7 @@ function useTodos(todoId) { const queryKey = ['todos', todoId] return useQuery({ queryKey, - queryFn: () => fetchTodoById(todoId.value) + queryFn: () => fetchTodoById(todoId.value), }) } ```