TanStack Query
Hooks for managing, caching and synchronizing remote data in React.
State and data fetching npm MIT
Used in agent projects
1,217
9.6% of 12,697 public repos built with AI coding agents
Rank in state and data fetching
#1 of 20
by use in those projects
Downloads
65.8M
npm, last 7 days, @tanstack/react-query
GitHub stars
50.4K
last push Oct 10, 2026
How TanStack Query is used
TanStack Query is a dependency in 1,217 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (9.6%), #1 of 20 in state and data fetching. The most used alternative there is Zustand. Projects that use it most often also use Class Variance Authority (56.8%), Tailwind Merge (61.0%), clsx (62.0%). It is more common in projects set up for Roo Code (16.8%) than for GitHub Copilot (6.6%).
Often used with TanStack Query
| Class Variance Authority | 56.8% of TanStack Query projects · 4.0× more than average |
|---|---|
| Tailwind Merge | 61.0% of TanStack Query projects · 3.6× more than average |
| clsx | 62.0% of TanStack Query projects · 3.5× more than average |
| React | 96.3% of TanStack Query projects · 2.2× more than average |
| Radix UI | 52.8% of TanStack Query projects · 4.4× more than average |
| Lucide React | 64.2% of TanStack Query projects · 3.2× more than average |
| Tailwind CSS | 84.3% of TanStack Query projects · 2.4× more than average |
| React Hook Form | 41.7% of TanStack Query projects · 5.2× more than average |
By coding agent
| Claude Code | 8.3% of projects set up for it |
|---|---|
| Cursor | 10.5% of projects set up for it |
| GitHub Copilot | 6.6% of projects set up for it |
| OpenAI Codex | 9.4% of projects set up for it |
| Gemini CLI | 6.8% of projects set up for it |
| Devin Desktop | 10.2% of projects set up for it |
| OpenCode | 7.8% of projects set up for it |
| Roo Code | 16.8% of projects set up for it |
Share of public repos configured for each agent that list TanStack Query as a dependency.
Install
| Package | npm install @tanstack/react-query |
|---|---|
| Main stacks | Next.js (621), TypeScript / JavaScript (522), React Native / Expo (41), Python (15) |
| Example projects | ding113/claude-code-hub, sunflower-land/sunflower-land, vega-org/vega-app, ant-design/ant-design-web3, veithly/BountyBoard |
Alternatives to TanStack Query
| Tool | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|
| Zustand npm Lightweight state management for React with minimal boilerplate. |
752 (5.9%) | 60.8M | 58.8K | MIT |
| RxJS npm Reactive programming library for composing async events and data streams in JavaScript. |
176 (1.4%) | 104M | 31.7K | Apache-2.0 |
| React Redux npm Official React bindings for Redux state management with hooks. |
135 (1.1%) | 39.2M | 23.4K | MIT |
| Jotai npm Minimal React state management with atoms as primitive building blocks for flexibility. |
124 (1.0%) | 6.6M | 21.3K | MIT |
| SWR npm React hooks library for data fetching with caching, revalidation and real-time updates. |
123 (1.0%) | 18.8M | 32.5K | MIT |
| Redux Toolkit npm Official Redux library with built-in best practices and reduced boilerplate for state management. |
120 (0.9%) | 32.6M | 11.2K | MIT |
| Immer npm Immutable state management by mutating a draft in a simpler API. |
77 (0.6%) | 64.6M | 29K | MIT |
| Pinia npm Intuitive, type-safe state management store for Vue applications. |
69 (0.5%) | 5.2M | 14.7K | MIT |