338 B
338 B
id, title, ref
| id | title | ref |
|---|---|---|
| query-keys | Query Keys | docs/framework/react/guides/query-keys.md |
import type { Ref } from 'vue'
function useTodos(todoId: Ref<string>) {
const queryKey = ['todos', todoId]
return useQuery({
queryKey,
queryFn: () => fetchTodoById(todoId.value),
})
}