Elestia Open Source Ratings
9.0

TanStack Query

The default choice. 1st of 10 state and data fetching.

TanStack Query is the leading library for fetching, caching and syncing server data in React, with bindings for Vue, Solid, Svelte and Angular. For a new app that talks to an API, it is the default choice today. Pair it with a small client-state store such as Zustand if you also need one.

Best for: Any React or other front-end team that needs cached, fresh server data, with mutations, pagination and SSR hydration, from REST or RPC APIs.

WebsiteGitHubnpm

Scores

Overall9.0

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 9.0, likely 8.0 to 9.5

It is the category's default for server state: the deepest feature set, very active upkeep, the strongest survey standing, and growth above the median. It does not replace a client-state store, and the 2026 org-level supply-chain incident keeps it below a perfect score. Among its peers it ranks first for data fetching, alongside Zustand for client state.

GPT-6.2 Sol: 8.9, likely 7.8 to 9.6

TanStack Query is my default for new React apps that need a client-side server data cache with mutations and background refreshes. Active maintenance and production use support that choice. SWR has an appeal for small bundles, and RTK Query fits teams that already organize app state around Redux. The range reflects how much the app needs those tradeoffs and how much shared UI state it must manage separately.

Needed by many7.0

How many developers need a tool for this job?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

Most web apps fetch server data and benefit from caching it, so a large share of front-end developers need this job done. The rated package is React-only. The repository also serves Vue, Solid, Svelte and Angular. It does not cover general client state, which is narrower than the full category.

  • github description: Covers React, Solid, Svelte and Vue adapters
  • heise.de/-11197819: Most-used library in State of React 2025

GPT-6.2 Sol: 7.0, likely 5.9 to 8.1

Keeping API data fresh is a common need in interactive web and mobile apps. The measured package serves React and React Native, and the larger project also ships adapters for Vue, Solid, Svelte, and Angular. The range reflects how often built-in framework fetching is sufficient and how much an app relies on shared client-side state.

Helps a lot9.0

How well does it do the job for those who need it?

Claude Opus 5.5: 9.0, likely 8.0 to 10.0

It is the most complete server-state tool in the category: caching, staleness control, mutations, infinite queries, SSR hydration, offline persistence and devtools. Its types are strong, its documentation is extensive, and AI agents write it correctly because the patterns are so common. Comparisons favour it over SWR for mutations, and it lacks only a normalized cache.

GPT-6.2 Sol: 8.9, likely 7.8 to 9.6

Stable React Query 5.108.2 handles caching, pagination, retries, and optimistic updates with strong type inference. The docs give coding agents a clear API to follow, though choosing query keys and invalidating data correctly still requires app context. A recent benchmark found similar first-fetch times and a smaller bundle for SWR on the tested imports. An open report of stale combined query results leaves some uncertainty around complex subscriptions.

Holds up over time8.9

Will it still be a good choice in two years?

Claude Opus 5.5: 9.0, likely 8.0 to 10.0

The repository had 1,897 commits last year, has 1,154 contributors, and only 42 issues are open. Releases are frequent and there is a long-running team behind it. TanStack is funded by sponsors and partners, and v5 has stayed stable for years, with v6 work only exploratory. The ecosystem is moving toward the wider TanStack family, not away from it.

  • github commitsLastYear: 1897 commits in the last year
  • github openIssues: 42 open against 2371 closed
  • npm versionsLastYear: 82 versions, latest on 2026-11-20
  • TanStack maintainers: Tanner Linsley and TkDodo lead it, with partner funding

GPT-6.2 Sol: 8.8, likely 7.5 to 9.6

The React package published 82 versions in a year, and recent core fixes show active maintenance by several contributors. TanStack reports funding from sponsors, partnerships, and companies that use its tools. The v5 upgrade required downstream projects to replace query callbacks, and patch releases can change types. Public release and issue records leave uncertainty about typical response times and how many maintainers can authorize releases.

Used widely8.3

How many use it, and is that growing?

Claude Opus 5.5: 9.0, likely 8.0 to 10.0

It had about 338M downloads in 4 weeks, up 6.9x on a year before. That is well above the 4.1 median, and only Zustand is close. Some installs come in through TanStack Router, tRPC and code generators. The 21,873 dependent repos are fewer than Redux Toolkit's or Zustand's, probably partly because the package is scoped and newer, but the trend and surveys show it is widely chosen.

  • npm downloadsLast4Weeks: 337.9M, against 49.1M a year before
  • medianDownloadsRatio: Its 6.9x ratio beats the 4.1 median
  • dependents repos: 21,873 repos, lower than Zustand and RTK
  • github stars: 50.6k stars

GPT-6.2 Sol: 7.5, likely 6.0 to 8.6

Four-week downloads grew 6.89× year over year, above the 4.1× catalog baseline and roughly even with Zustand. Ecosyste.ms tracks 21,873 repositories and 1,082 packages, with fewer tracked repositories than Redux Toolkit, Zustand, or SWR. Automated and downstream installs inflate npm counts, while stars and Bluesky links cover the whole Query monorepo. The download trend and survey both point to growth, with incomplete repository coverage leaving the number of direct choices uncertain.

  • npm downloadsLast4Weeks and downloadsSame4WeeksYearAgo: 337.9 million downloads versus 49.1 million a year earlier.
  • medianDownloadsRatio: The catalog’s year-over-year baseline is 4.1×.
  • dependents repos and packages: 21,873 tracked repositories and 1,082 tracked packages.
  • peers: Second in downloads and seventh in tracked dependent repositories.
  • github stars and bluesky posts: 50,603 stars and 39 Bluesky posts across the Query project.
  • 2025.stateofreact.com/en-US/libraries/data-loading: Survey respondents report rising TanStack Query usage.
  • github.com/refinedev/refine/blob/main/documentation/docs/migration-guide/4x-to-5x.md: Refine v5 requires React Query, illustrating downstream installs.
Vouched for9.0

Who stands behind it being good?

Claude Opus 5.5: 9.0, likely 8.0 to 10.0

It ranked first among libraries in State of React 2024 and again in 2025, with strong positive and very low negative sentiment. Independent comparisons recommend it, and tRPC, Orval, hey-api and TanStack Router build on it. Survey samples are self-selected, so the range stays one point wide.

GPT-6.2 Sol: 9.0, likely 7.9 to 9.7

TanStack Query led satisfaction among the data-loading libraries in State of React 2025. Bluesky uses it in its feed and Supabase Studio ships it in its dashboard. Refine v5 builds its data hooks on it, and an independent benchmark adds evidence on bundle size and fetch performance. The survey samples React developers, and the benchmark covers a narrow set of workloads.

Safe7.9

How safe is it to depend on?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

It has no advisories, one dependency and an MIT licence. In May 2026, attackers used cache poisoning and OIDC token theft in TanStack's CI to publish malicious versions of 42 Router and Start packages. The postmortem confirms the Query packages were clean, and the CI was hardened afterwards. There is no Scorecard data, and the incident shows real org-level supply-chain risk.

GPT-6.2 Sol: 8.7, likely 7.4 to 9.6

The MIT-licensed React package has one runtime dependency, TanStack Query Core, and the bundle shows zero OSV advisories. Query’s release workflow uses GitHub Actions with short-lived credentials for npm publishing. The May compromise affected TanStack Router and Start packages, and the August incident affected a third-party code generator. The missing OpenSSF Scorecard and limited visibility into release permissions widen the range.

Good

  • Caching, background refetch, deduplication, retries, infinite queries and optimistic mutations all work out of the box with sensible defaults.
  • TypeScript types are excellent, and queryOptions makes keys and data types reusable and safe.
  • Very active upkeep: v5 has had no breaking major in years, and maintainers close issues fast (42 open of about 2,400).
  • Adapters for React, Vue, Solid, Svelte and Angular, plus devtools and a large ecosystem of code generators (Orval, hey-api, tRPC).

Bad

  • It manages server state only, so purely client-side state still needs another tool.
  • No normalized cache, so related queries must be invalidated by hand, unlike Apollo for GraphQL.
  • The bundle is larger than SWR's, at about 13 KB gzipped against about 4 KB.
  • In May 2026 attackers published malicious versions of 42 @tanstack packages through the shared org's CI. Query packages were confirmed clean, but the incident shows org-level risk.

The numbers

npm downloads, 4 weeks
338M ×6.9 in a year
GitHub stars
51k
Commits, 12 months
1.9k
npm version
5.108.2 Nov 2026
Versions, 12 months
82
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
None
Licence
MIT

Read on 21 November 2026 from GitHub (TanStack/query), npm (@tanstack/react-query), OSV and the OpenSSF Scorecard.

State and data fetching

  1. 9.0TanStack Query
  2. 8.5Zustand
  3. 8.0Pinia
  4. 7.6Jotai
  5. 7.6Redux Toolkit
  6. 7.5Apollo Client
  7. 7.3XState
  8. 7.0SWR
  9. 6.7MobX
  10. 6.5Valtio
Compare all 10 on six scores