Open History to see the last commit
1---
2id: useQueries
3title: useQueries
4---
5β
6The `useQueries` hook can be used to fetch a variable number of queries:
7β
8```js
9const results = useQueries([
10 { queryKey: ['post', 1], queryFn: fetchPost },
11 { queryKey: ['post', 2], queryFn: fetchPost },
12])
13```
14β
15**Options**
16β
17The `useQueries` hook accepts an array with query option objects identical to the [`useQuery` hook](/reference/useQuery).
18β
19**Returns**
20β
21The `useQueries` hook returns an array with all the query results.