snapshot of https://github.com/TanStack/query.git (main, 2026-09-16; blobs > 131072B omitted)
This commit is contained in:
21
docs/framework/vue/guides/query-keys.md
Normal file
21
docs/framework/vue/guides/query-keys.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
id: query-keys
|
||||
title: Query Keys
|
||||
ref: docs/framework/react/guides/query-keys.md
|
||||
---
|
||||
|
||||
[//]: # 'Example5'
|
||||
|
||||
```ts
|
||||
import type { Ref } from 'vue'
|
||||
|
||||
function useTodos(todoId: Ref<string>) {
|
||||
const queryKey = ['todos', todoId]
|
||||
return useQuery({
|
||||
queryKey,
|
||||
queryFn: () => fetchTodoById(todoId.value),
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
[//]: # 'Example5'
|
||||
Reference in New Issue
Block a user