Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@tanstack/react-query

TanStack50.4mMIT5.90.5TypeScript support: included

Hooks for managing, caching and syncing asynchronous and remote data in React

readme

TanStack Query

TanStack Query

An async state management library built to simplify fetching, caching, synchronizing, and updating server state.

  • Protocol‑agnostic fetching (REST, GraphQL, promises, etc.)
  • Caching, refetching, pagination & infinite scroll
  • Mutations, dependent queries & background updates
  • Prefetching, cancellation & React Suspense support

Read the docs →

Get Involved

Partners

<picture> <source media="(prefers-color-scheme: dark)" srcset="https://tanstack.com/assets/coderabbit-dark-CMcuvjEy.svg" height="40" /> <source media="(prefers-color-scheme: light)" srcset="https://tanstack.com/assets/coderabbit-light-DVMJ2jHi.svg" height="40" /> CodeRabbit </picture> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://tanstack.com/assets/cloudflare-white-DQDB7UaL.svg" height="60" /> <source media="(prefers-color-scheme: light)" srcset="https://tanstack.com/assets/cloudflare-black-CPufaW0B.svg" height="60" /> Cloudflare </picture>
Query & you?

We're looking for TanStack Query Partners to join our mission! Partner with us to push the boundaries of TanStack Query and build amazing things together.

LET'S CHAT

Explore the TanStack Ecosystem

… and more at TanStack.com »