📄 tanstack/query/v4/docs/framework/react/reference/useQueries

File: useQueries.md | Updated: 11/15/2025

Source: https://tanstack.com/query/v4/docs/framework/react/reference/useQueries



TanStack

Query v4v4

Search...

+ K

Auto

Log In

TanStack StartRC

Docs Examples GitHub Contributors

TanStack Router

Docs Examples GitHub Contributors

TanStack Query

Docs Examples GitHub Contributors

TanStack Table

Docs Examples Github Contributors

TanStack Formnew

Docs Examples Github Contributors

TanStack DBbeta

Docs Github Contributors

TanStack Virtual

Docs Examples Github Contributors

TanStack Paceralpha

Docs Examples Github Contributors

TanStack Storealpha

Docs Examples Github Contributors

TanStack Devtoolsalpha

Docs Github Contributors

More Libraries

Maintainers Partners Support Learn StatsBETA Discord Merch Blog GitHub Ethos Brand Guide

Documentation

Framework

React logo

React

Version

v4

Search...

+ K

Menu

Getting Started

Guides & Concepts

Community Resources

API Reference

ESLint

Plugins

Examples

Framework

React logo

React

Version

v4

Menu

Getting Started

Guides & Concepts

Community Resources

API Reference

ESLint

Plugins

Examples

useQueries

Copy Markdown

The useQueries hook can be used to fetch a variable number of queries:

tsx

const results = useQueries({
  queries: [\
    { queryKey: ['post', 1], queryFn: fetchPost, staleTime: Infinity },\
    { queryKey: ['post', 2], queryFn: fetchPost, staleTime: Infinity },\
  ],
})


const results = useQueries({
  queries: [\
    { queryKey: ['post', 1], queryFn: fetchPost, staleTime: Infinity },\
    { queryKey: ['post', 2], queryFn: fetchPost, staleTime: Infinity },\
  ],
})

Options

The useQueries hook accepts an options object with a queries key whose value is an array with query option objects identical to the useQuery hook (excluding the context option).

  • context?: React.Context<QueryClient | undefined>
    • Use this to use a custom React Query context. Otherwise, defaultContext will be used.

Having the same query key more than once in the array of query objects may cause some data to be shared between queries, e.g. when using placeholderData and select. To avoid this, consider de-duplicating the queries and map the results back to the desired structure.

Returns

The useQueries hook returns an array with all the query results. The order returned is the same as the input order.

Edit on GitHub

useQuery

useInfiniteQuery

Partners Become a Partner

Code RabbitCode Rabbit CloudflareCloudflare AG GridAG Grid NetlifyNetlify NeonNeon WorkOSWorkOS ClerkClerk ConvexConvex ElectricElectric SentrySentry PrismaPrisma StrapiStrapi UnkeyUnkey

[###### Want to Skip the Docs?

Query.gg - The Official React Query Course
\

“If you’re serious about *really* understanding React Query, there’s no better way than with query.gg”—Tanner Linsley

Learn More](https://query.gg/?s=tanstack)

You are currently reading v4 docs. Redirect to latest version?

Latest Hide

scarf analytics