Open History to see the last commit
1---
2id: query-keys
3title: Query Keys
4ref: docs/framework/react/guides/query-keys.md
5---
6β
7[//]: # 'Example5'
8β
9```ts
10import type { Ref } from 'vue'
11β
12function useTodos(todoId: Ref<string>) {
13 const queryKey = ['todos', todoId]
14 return useQuery({
15 queryKey,
16 queryFn: () => fetchTodoById(todoId.value),
17 })
18}
19```
20β
21[//]: # 'Example5'