# TanStack/query

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/tanstack-query).**

48,539 stars · 3,712 forks · TypeScript · mit

## Links

- GitHub: https://github.com/TanStack/query
- Homepage: https://tanstack.com/query
- awesome-repositories: https://awesome-repositories.com/repository/tanstack-query.md

## Topics

`async` `cache` `data` `fetch` `graphql` `hooks` `query` `react` `rest` `solid` `stale` `stale-while-revalidate` `svelte` `typescript` `update` `vue`

## Description

This project provides a comprehensive suite of tools for managing asynchronous state and building full-stack web applications. At its core, it functions as a centralized synchronization layer that automates data fetching, caching, and background revalidation, ensuring that remote server data remains consistent with the local user interface. By utilizing a declarative, hook-based programming model, it simplifies the management of complex data lifecycles and loading states.

The project distinguishes itself through a headless design philosophy that decouples business logic from visual presentation, allowing for framework-agnostic component reuse. It includes advanced capabilities for optimistic UI updates, which provide instant feedback while automatically reconciling state if backend persistence fails. Additionally, it features a robust request deduplication engine and intelligent cache invalidation strategies that trigger updates based on window focus or network connectivity, optimizing both bandwidth and server load.

Beyond core state management, the ecosystem offers a wide range of utilities for modern application development. This includes support for virtualized list rendering, type-safe routing, and complex table logic, alongside specialized tools for artificial intelligence integration, keyboard shortcut management, and performance-oriented timing utilities. The project also provides a unified development experience through integrated debugging tools, CLI-based project scaffolding, and standardized workflows for building and publishing packages.

## Tags

### Web Development

- [Asynchronous State Management](https://awesome-repositories.com/f/web-development/asynchronous-state-management.md) — Synchronizing remote server data with the user interface by automating fetching, caching, and background updates to ensure information remains consistent.
- [Asynchronous State Managers](https://awesome-repositories.com/f/web-development/asynchronous-state-managers.md) — Automates fetching, caching, and background synchronization of remote server data.
- [Data Synchronization Libraries](https://awesome-repositories.com/f/web-development/data-synchronization-libraries.md) — Automates data fetching and background revalidation to maintain state consistency between remote servers and local clients.
- [Full-Stack Web Frameworks](https://awesome-repositories.com/f/web-development/full-stack-web-frameworks.md) — Develops complete web applications using server-side rendering, streaming, and type-safe server functions. ([source](https://tanstack.com/start/latest/docs/framework/react/overview))
- [Declarative Data Fetching](https://awesome-repositories.com/f/web-development/declarative-data-fetching.md) — A framework for managing remote data lifecycles through standardized hooks that handle loading states, error handling, and automatic revalidation.
- [Declarative Data Hooks](https://awesome-repositories.com/f/web-development/declarative-data-hooks.md) — Manages remote data states through standardized hooks to handle loading, error, and success transitions automatically.
- [Type-Safe Routing Systems](https://awesome-repositories.com/f/web-development/type-safe-routing-systems.md) — Creates navigation paths with strict type definitions to ensure end-to-end safety across the entire application lifecycle. ([source](https://tanstack.com/router))
- [URL Routing Utilities](https://awesome-repositories.com/f/web-development/url-routing-utilities.md) — Synchronizes complex application state with browser URL parameters for type-safe navigation. ([source](https://tanstack.com/router))
- [Data-Aware Routers](https://awesome-repositories.com/f/web-development/data-aware-routers.md) — Loads information during navigation using a dedicated interface that supports automatic preloading and caching. ([source](https://tanstack.com/router))
- [Data Fetching Utilities](https://awesome-repositories.com/f/web-development/data-fetching-utilities.md) — Improves performance by implementing automatic preloading and caching during data retrieval.
- [Optimistic Update Engines](https://awesome-repositories.com/f/web-development/optimistic-update-engines.md) — Applies local state updates immediately while tracking pending operations to perform automatic rollbacks if server persistence fails.
- [Optimistic Update Handlers](https://awesome-repositories.com/f/web-development/optimistic-update-handlers.md) — Provides instant interface feedback while automatically handling backend persistence rollbacks.
- [Request Deduplication Utilities](https://awesome-repositories.com/f/web-development/request-deduplication-utilities.md) — Collapses multiple identical concurrent network requests into a single execution to optimize bandwidth and server load.
- [Cache Invalidation Strategies](https://awesome-repositories.com/f/web-development/cache-invalidation-strategies.md) — Triggers automatic data refetching based on specific events like window focus, network reconnection, or configurable time intervals.

### Artificial Intelligence & ML

- [LLM Provider Adapters](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-provider-adapters.md) — Connects to various artificial intelligence models using standardized adapters to maintain consistent interfaces across different service providers. ([source](https://tanstack.com/ai/latest/docs/getting-started/overview))
- [AI Tooling Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-tooling-frameworks.md) — Defines reusable tools with type-safe schemas that execute automatically on either the server or client. ([source](https://tanstack.com/ai/latest/docs/getting-started/overview))
- [Chat State Managers](https://awesome-repositories.com/f/artificial-intelligence-ml/chat-state-managers.md) — Manages message history and streaming responses across different environments using a headless client. ([source](https://tanstack.com/ai/latest/docs/getting-started/overview))
- [Agent Skill Registries](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-skill-registries.md) — Identifies intent-enabled packages within project dependencies to grant artificial intelligence agents access to specific functional capabilities. ([source](https://tanstack.com/intent/latest/docs/overview))

### Data & Databases

- [Server State Managers](https://awesome-repositories.com/f/data-databases/server-state-managers.md) — Synchronizes remote data with the user interface by automating data fetching, caching, and background updates. ([source](https://tanstack.com/query/latest/docs/framework/react/overview))
- [Reactive Query Engines](https://awesome-repositories.com/f/data-databases/reactive-query-engines.md) — Retrieves and joins data across collections using incremental updates that ensure sub-millisecond changes as underlying information shifts. ([source](https://tanstack.com/db/latest/docs/overview))
- [Data Collection Schemas](https://awesome-repositories.com/f/data-databases/data-collection-schemas.md) — Stores and organizes normalized data sets using schema integration to support runtime validation and automatic type transformations. ([source](https://tanstack.com/db/latest/docs/overview))
- [Optimistic Mutation Handlers](https://awesome-repositories.com/f/data-databases/optimistic-mutation-handlers.md) — Updates collections with instant user interface feedback and automatically rolls back changes if the backend persistence handler fails. ([source](https://tanstack.com/db/latest/docs/overview))
- [Data Synchronization Configurations](https://awesome-repositories.com/f/data-databases/data-synchronization-configurations.md) — Optimizes data loading by setting sync modes for collections, including eager, on-demand, and progressive strategies. ([source](https://tanstack.com/db/latest/docs/overview))

### Software Engineering & Architecture

- [Headless Data Controllers](https://awesome-repositories.com/f/software-engineering-architecture/headless-data-controllers.md) — A logic-focused interface that separates complex data handling and business rules from visual presentation and styling requirements.
- [Headless Logic Controllers](https://awesome-repositories.com/f/software-engineering-architecture/headless-logic-controllers.md) — Separates complex business logic from visual presentation to ensure framework-agnostic application architecture.
- [Debouncing Utilities](https://awesome-repositories.com/f/software-engineering-architecture/debouncing-utilities.md) — Delays function execution until inactivity periods pass to prevent unnecessary processing. ([source](https://tanstack.com/pacer/latest/docs/overview))
- [Headless Logic Patterns](https://awesome-repositories.com/f/software-engineering-architecture/headless-logic-patterns.md) — Separates complex business logic and data management from visual presentation to ensure framework-agnostic component reuse.
- [Rate Limiting Utilities](https://awesome-repositories.com/f/software-engineering-architecture/rate-limiting-utilities.md) — Restricts function call frequency using window-based algorithms. ([source](https://tanstack.com/pacer/latest/docs/overview))
- [Throttling Utilities](https://awesome-repositories.com/f/software-engineering-architecture/throttling-utilities.md) — Limits function call rates to ensure controlled execution during continuous input. ([source](https://tanstack.com/pacer/latest/docs/overview))

### User Interface & Experience

- [Headless Table Frameworks](https://awesome-repositories.com/f/user-interface-experience/headless-table-frameworks.md) — Manages complex table state and logic while remaining agnostic to visual presentation. ([source](https://tanstack.com/table/latest/docs/introduction))
- [Headless Table Logic](https://awesome-repositories.com/f/user-interface-experience/headless-table-logic.md) — Managing complex table state and business logic using a framework-agnostic approach that separates data handling from visual presentation and styling.
- [Keyboard Shortcut Registries](https://awesome-repositories.com/f/user-interface-experience/keyboard-shortcut-registries.md) — Assigns keyboard commands to actions while resolving modifier keys and conflicts. ([source](https://tanstack.com/hotkeys/latest/docs/overview))
- [List Virtualization Engines](https://awesome-repositories.com/f/user-interface-experience/list-virtualization-engines.md) — Optimizes performance by rendering only visible items in large datasets. ([source](https://tanstack.com/virtual/latest/docs/introduction))
- [Optimistic UI Orchestrators](https://awesome-repositories.com/f/user-interface-experience/optimistic-ui-orchestrators.md) — A mechanism for updating application data with instant user interface feedback while automatically handling rollbacks if the backend persistence operation fails.
- [Virtualized List Rendering](https://awesome-repositories.com/f/user-interface-experience/virtualized-list-rendering.md) — Displaying large datasets by rendering only the items currently visible in the viewport to maintain high performance and smooth scrolling.
- [Virtualized List Engines](https://awesome-repositories.com/f/user-interface-experience/virtualized-list-engines.md) — A rendering strategy for displaying large datasets by processing only the items currently visible in the viewport to maintain high performance.
- [Keyboard Input Handlers](https://awesome-repositories.com/f/user-interface-experience/keyboard-input-handlers.md) — Monitors active keyboard states to trigger interface updates based on user input. ([source](https://tanstack.com/hotkeys/latest/docs/overview))

### Development Tools & Productivity

- [Project Scaffolding Tools](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-tools.md) — Generates new projects using pre-configured templates to standardize folder structures. ([source](https://tanstack.com/cli/latest/docs/overview))
- [Project Add-on Installers](https://awesome-repositories.com/f/development-tools-productivity/project-add-on-installers.md) — Installs and configures external services like authentication and databases automatically. ([source](https://tanstack.com/cli/latest/docs/overview))
- [Development Dashboards](https://awesome-repositories.com/f/development-tools-productivity/development-dashboards.md) — Consolidates multiple debugging utilities into a single interface. ([source](https://tanstack.com/devtools))
- [Package Configuration Tools](https://awesome-repositories.com/f/development-tools-productivity/package-configuration-tools.md) — Standardizes package settings and build workflows to ensure consistent code quality. ([source](https://tanstack.com/config))
