# TanStack Query

> Async server-state management and data fetching for TS/JS, React, Vue, Svelte, Solid and Angular

Source: https://talira.ai/catalog/tanstack-query-hhnbcek5
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / data fetching](https://talira.ai/categories/libraries/data-fetching), [frameworks / react](https://talira.ai/categories/frameworks/react)
- Platforms: web
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Pricing notes: TanStack offers paid enterprise support and consulting separately.
- Free tier: yes[^1]
- Self-hostable: yes[^1]
- Backed by: [TanStack](https://talira.ai/orgs/tanstack.md)

TanStack Query (formerly React Query) is an open source library for fetching, caching and updating server state in web apps. Components declare the data they need with query keys, and Query's cache coordinates fetches, shared subscribers, freshness, retries and background updates, with request deduplication, refetching when the window regains focus and garbage collection of unused data built in. Stale data renders immediately from the cache while a background request refreshes it. Mutations handle optimistic updates, pending state, rollback on error and targeted cache invalidation. Devtools, cache persistence to storage, offline mutation queues, an ESLint plugin and codemods round it out. It has adapters for React, Preact, Vue, Svelte, Solid, Angular and Lit on a framework-agnostic core, is written in TypeScript, and is MIT licensed by TanStack.

## Links

- Website: https://tanstack.com/query
- GitHub: https://github.com/TanStack/query
- Docs: https://tanstack.com/query/latest/docs/framework/react/overview

## Problems it solves

- cache API responses in my React app and refetch them automatically
- stop writing useEffect and loading-state boilerplate to fetch data
- keep server data fresh in the background without blocking the UI
- deduplicate identical API requests from many components
- optimistic updates with rollback when a mutation fails
- manage server state separately from client state in a frontend app
- data fetching and caching for Vue, Svelte, Solid or Angular
- persist query cache to local storage for offline use
- inspect and debug my app's cached server data with devtools

## Features

- query cache with query keys
- request deduplication
- automatic retries
- background refetching and window-focus updates
- stale-while-revalidate rendering
- garbage collection of unused queries
- mutations with optimistic updates, rollback and invalidation
- devtools
- cache persistence with sync and async storage persisters
- offline mutation queues
- ESLint plugin and codemods
- adapters for React, Preact, Vue, Svelte, Solid, Angular and Lit
- framework-agnostic core

## Capabilities

- Has official SDKs: plan not known

## Trust

Overall: 0.77 out of 1.
Signals: maintenance 1.00, adoption 0.94, momentum 0.84, community 1.00, backing 0.30, extensibility 0.00.

- last commit today
- 1083 commits in the last 90 days
- latest release release-2026-11-23-1318 yesterday
- 50.6k GitHub stars
- 1160 contributors
- accepts sponsorship (Github, Github)
- backed by TanStack

## Alternatives

- [Redux](https://talira.ai/catalog/redux-c8rxkxfs.md): A JS library for predictable global state management

## Sources

[^1]: https://github.com/TanStack/query (checked 22 Nov 2026)
