snapshot of https://github.com/TanStack/query.git (main, 2026-09-16; blobs > 131072B omitted)
This commit is contained in:
22
docs/framework/vue/guides/query-functions.md
Normal file
22
docs/framework/vue/guides/query-functions.md
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
id: query-functions
|
||||
title: Query Functions
|
||||
ref: docs/framework/react/guides/query-functions.md
|
||||
---
|
||||
|
||||
[//]: # 'Example4'
|
||||
|
||||
```js
|
||||
const result = useQuery({
|
||||
queryKey: ['todos', { status, page }],
|
||||
queryFn: fetchTodoList,
|
||||
})
|
||||
|
||||
// Access the key, status and page variables in your query function!
|
||||
function fetchTodoList({ queryKey }) {
|
||||
const [_key, { status, page }] = queryKey
|
||||
return new Promise()
|
||||
}
|
||||
```
|
||||
|
||||
[//]: # 'Example4'
|
||||
Reference in New Issue
Block a user