Skip to content
Agents tracked: 502 Releases (7d): 613 Agent status: 4 with issuesSince last limit reset: Claude 7d · Codex 5d For AI agents: Markdown Updated Nov 18, 2026

TanStack Query vs SWR

In 4,864 JavaScript/TypeScript projects set up for AI coding agents, TanStack Query is a dependency in 460 (9.5%) and SWR in 50 (1.0%): TanStack Query is 9.2× as common. Among repos created in the last 90 days that use a state and data fetching tool, TanStack Query is in 35.0% and SWR in 2.5%, against 44.5% and 4.9% of older ones. 13 projects list both, often a sign of a migration or of a monorepo with several apps.

State and data fetching npm Updated Nov 17, 2026

TanStack Query9.5%
SWR1.0%

Share of 4,864 JavaScript/TypeScript projects set up for AI coding agents that list each one as a dependency.

Side by side

TanStack QuerySWR
Agent projects that use it46050
Rank in state and data fetching#1#5
In new repos with a state and data fetching tool (last 90 days)35.0%2.5%
In older repos with one44.5%4.9%
Downloads, last 7 days86.6M27.2M
GitHub stars50.6K32.5K
Last push to its repoNov 17, 2026Oct 16, 2026
LicenseMITMIT
Funding——
Projects that list both13

Downloads include CI runs and installs as a dependency of other packages. Stars and pushes are from GitHub's API; downloads from npm.

By coding agent

Projects set up forJavaScript/TypeScript reposTanStack QuerySWR
Claude Code2,6178.8%1.0%
GitHub Copilot2,3508.4%0.7%
Cursor1,99012.2%1.6%
Gemini CLI4226.9%0%
OpenAI Codex4099.8%0%
OpenCode3048.9%0%
OpenClaw2413.7%0%
Devin Desktop23113.0%0%
Kiro1258.0%0%
Roo-Code9017.8%0%

Share of the JavaScript/TypeScript repos configured for each agent (its config file in the repo) that list the tool. A repo set up for two agents counts for both.

TanStack Query

Hooks for managing, caching and synchronizing remote data in React.

Most often used with it:

Lucide React77.6% of its projects
Tailwind Merge75.0% of its projects
clsx76.5% of its projects
React98.5% of its projects
Class Variance Authority70.4% of its projects

npm install @tanstack/react-query

SWR

React hooks library for data fetching with caching, revalidation and real-time updates.

Most often used with it:

Next.js88.0% of its projects
Lucide React80.0% of its projects
clsx78.0% of its projects
React100.0% of its projects
Tailwind Merge74.0% of its projects

npm install swr

How we count

Projects are public GitHub repos our weekly scan finds through coding-agent config files (CLAUDE.md, AGENTS.md, .cursor/mcp.json and others); a project uses a tool when its package.json, requirements.txt or pyproject.toml lists it. "Same job" was checked for every pair, so add-ons and companions are never paired. Shares by repo age compare repos created in the last 90 days with older ones in the same scan. More on the method.