Overview
TanStack Query is the TanStack library for managing asynchronous server state in applications. The repository README summarizes the mission as simplifying fetching, caching, synchronizing, and updating server state, and it calls out protocol-agnostic fetching, refetching, pagination, infinite scroll, mutations, dependent queries, background updates, prefetching, cancellation, and React Suspense support. In practical terms, this means the project is not trying to replace local component state. It gives applications a shared, consistent layer for remote data whose ownership, freshness, latency, and failure modes differ from ordinary UI state.
Sources: README.md
The official product docs describe TanStack Query as formerly known as React Query, but the repository layout shows why the name is broader than React. The framework-agnostic core lives in its own package, while adapters expose the same server-state model through framework-native APIs. The workspace includes packages, integrations, and examples for several frameworks, so readers should think of this repository as a multi-package platform rather than a single hook library. React remains the most prominent entry point, but Vue, Solid, Angular, and other adapters share the same underlying cache and orchestration concepts.
Sources: pnpm-workspace.yaml, packages/query-core/package.json, packages/react-query/package.json, packages/vue-query/package.json, packages/solid-query/package.json, packages/angular-query-experimental/package.json
Purpose and Scope
Use this page to orient yourself before diving into installation, hooks, cache behavior, or framework-specific guides. TanStack Query focuses on server state: data that is fetched asynchronously, cached locally, synchronized with a remote source, and often updated by other users or processes outside the current application session. That distinction matters because server state needs policies for freshness, retries, background refetches, invalidation, garbage collection, request deduplication, and optimistic updates. The README’s feature list is a useful shorthand for the recurring tasks that the rest of the documentation expands into guides and reference pages.
Sources: README.md
The repository is organized to support a public documentation spine and a package publishing workflow. At the root, the package metadata identifies the repository as private, declares module semantics, pins the package manager to pnpm, and centralizes scripts for cleaning, testing, building, formatting, documentation generation, changesets, and publishing. Those root scripts delegate to Nx affected or run-many commands, which is important for a monorepo: contributors generally run high-level commands from the root, while package manifests define the concrete build and verification commands that apply to each package.
Sources: package.json
Relevant Source Files
- README.md — The reader-facing project introduction, feature summary, docs link, community links, and ecosystem pointers.
- package.json — The root monorepo metadata, pnpm version requirement, Nx-backed scripts, documentation verification script, and release-related commands.
- pnpm-workspace.yaml — The workspace package and example globs, dependency overrides, package-linking preferences, and supply-chain policy settings.
- packages/query-core/package.json — The framework-agnostic package manifest that describes the core powering TanStack Query and defines its public export shape.
- packages/react-query/package.json — The React adapter manifest, including its dependency on query-core, React peer dependency range, package exports, and build scripts.
- packages/vue-query/package.json — The Vue adapter manifest, including Vue 2/3 support through vue-demi and the dependency on query-core.
- packages/solid-query/package.json — The Solid adapter manifest, including Solid peer dependency requirements and development export conditions.
- packages/angular-query-experimental/package.json — The experimental Angular adapter manifest, including Angular peer dependencies, signal-oriented description, subpath exports, and devtools-related exports.
Repository and Package Model
The core architectural split is visible in the package manifests. The package named for the core describes itself as the framework-agnostic engine that powers TanStack Query. Framework packages then depend on that core and present APIs that feel natural in their host environment. For React, the manifest describes hooks for managing, caching, and syncing asynchronous and remote data. For Vue, the package has a similar role but depends on Vue-related tooling and compatibility packages. For Solid, the package description uses primitives language, reflecting Solid’s reactive model. Angular’s package uses signals language and is explicitly experimental.
Sources: packages/query-core/package.json, packages/react-query/package.json, packages/vue-query/package.json, packages/solid-query/package.json, packages/angular-query-experimental/package.json
This split gives the documentation a consistent shape. Core concepts such as queries, mutations, query keys, cache lifecycle, invalidation, retries, cancellation, network mode, hydration, and persistence are shared across adapters because they are implemented around the same core. Framework pages then explain how to create providers, call hooks or composables, wire dependency injection, or subscribe to results in the idioms of that ecosystem. When you move between adapters, keep the conceptual vocabulary stable and translate only the framework integration layer. That is why the overview should be read before the framework-specific pages.
Sources: packages/query-core/package.json, packages/react-query/package.json, packages/vue-query/package.json, packages/solid-query/package.json, packages/angular-query-experimental/package.json
The package manifests also reveal the publishing contract. The core, React, Vue, and Angular package manifests use ESM package type declarations and expose package entry points through exports. Several packages provide separate import and require targets, type declarations, legacy build paths, and custom development conditions. React and query-core also expose a React Native source entry in their manifests, which signals that package consumers and bundlers may resolve the library differently depending on runtime. These details explain why the API reference pages focus on stable exported entry points instead of internal source files.
Sources: packages/query-core/package.json, packages/react-query/package.json, packages/vue-query/package.json, packages/angular-query-experimental/package.json
Supported Frameworks and Examples
The workspace manifest is the broadest source for supported development surfaces. It includes package globs, integrations, and examples for Angular, React, Preact, Lit, Solid, Svelte, and Vue. It also excludes some Vue example patterns, such as Vue 2 and Nuxt-specific example folders, from the active workspace set. This tells contributors where the maintained examples live and explains why the documentation contains both framework-specific adapter pages and cross-framework example pages. A reader evaluating TanStack Query for a team can start with their framework adapter and then inspect examples that demonstrate the same cache behaviors in a working application.
Sources: pnpm-workspace.yaml
React is the default on-ramp for many readers because the official docs and package naming historically centered on React Query. The React manifest depends on the core package, declares React as a peer dependency, and includes React-specific test utilities and build steps. Vue’s manifest shows support for both Vue 2 and Vue 3 through peer dependency ranges, optional composition API support, and vue-demi tooling. Solid’s manifest declares Solid as a peer dependency and includes Solid-specific build and test tooling. Angular’s manifest uses Angular peer dependencies, exports experimental subpaths, and packages from a dist directory.
Sources: packages/react-query/package.json, packages/vue-query/package.json, packages/solid-query/package.json, packages/angular-query-experimental/package.json
Public Docs Entry Points
The README points readers to the TanStack Query documentation site as the canonical product documentation entry point. That site organizes the learning path around overview, installation, quick start, guides, framework adapters, examples, and API reference. The repository root also contains a documentation verification script, exposed through the root test docs command, and a generate-docs script. Those scripts show that docs are part of the project workflow, not an afterthought. For a reader, the practical conclusion is simple: use the docs site for learning order and this repository for package boundaries, source mapping, examples, tests, and release signals.
Sources: README.md, package.json
The official overview explains the motivation behind the library: most UI frameworks do not provide a holistic, opinionated way to fetch, cache, update, and synchronize remote data. That motivation maps cleanly to the repository. The core package supplies the shared server-state engine, while adapters make it usable from React hooks, Vue composables, Solid primitives, Angular signals, and other framework surfaces. The public docs therefore move from concepts to framework usage. If you are implementing a feature, start with the conceptual page that names the behavior, then open the adapter page that matches your runtime.
Sources: README.md, packages/query-core/package.json, packages/react-query/package.json, packages/vue-query/package.json, packages/solid-query/package.json, packages/angular-query-experimental/package.json
Build, Test, and Release Signals
The root manifest uses Nx for affected and run-many tasks across tests, builds, type checks, linting, documentation verification, dependency checks, and size checks. This is a useful orientation point for contributors because package manifests should not be treated as isolated projects. A change to a package can be validated through root-level affected tasks, while a package can still declare its own test and build commands. The root manifest also includes changeset commands for versioning and publishing, which matches the multi-package release model exposed by the workspace and package manifests.
Sources: package.json
Individual package manifests show repeated quality gates. Query-core, React, Vue, Solid, and Angular packages define compile, lint, type-test, library-test, build-test, and build scripts, although the exact commands differ by framework. Several packages run type checks across multiple TypeScript versions, which is significant for a library consumed by many application stacks. Build-test scripts use package publication checks such as publint and Are the Types Wrong where applicable. These signals help explain why the API reference pages should emphasize published contracts, type declarations, peer dependencies, and export paths rather than internal implementation details alone.
Sources: packages/query-core/package.json, packages/react-query/package.json, packages/vue-query/package.json, packages/solid-query/package.json, packages/angular-query-experimental/package.json
How to Navigate Next
If you are new to the project, read Installation next, then Quick Start. Those pages establish the React entry path with a client, provider, and query hook before the deeper guides explain cache lifecycle, query keys, query functions, mutations, invalidation, and advanced rendering behavior. If you are choosing a framework adapter, jump from this overview to the framework adapters overview and then to the dedicated Vue, Solid, Angular, Preact, Svelte, or Lit page. If you are contributing to the repository, keep the workspace manifest and root scripts in view so package-level work is validated consistently with the monorepo.
Sources: README.md, package.json, pnpm-workspace.yaml