Skip to content

Commit e8e1a0a

Browse files
authored
docs: add example for useQuery that doesn't use inline functions
1 parent 09d907e commit e8e1a0a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/src/pages/guides/query-functions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ A query function can be literally any function that **returns a promise**. The p
88
All of the following are valid query function configurations:
99

1010
```js
11+
useQuery(['todos'], fetchAllTodos)
1112
useQuery(['todos', todoId], () => fetchTodoById(todoId))
1213
useQuery(['todos', todoId], async () => {
1314
const data = await fetchTodoById(todoId)

0 commit comments

Comments
 (0)