tanstack-query

Manage React server state with TanStack Query v5 data fetching and caching.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/MuhamadAnang/wareflow-project --skill tanstack-query-muhamadanang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tanstack-query
Source: https://github.com/MuhamadAnang/wareflow-project/tree/main/.agents/skills/tanstack-query
Command: npx skills add https://github.com/MuhamadAnang/wareflow-project --skill tanstack-query-muhamadanang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps developers efficiently manage server state in React applications, simplifying data fetching, caching, and synchronization between the client and server.

Core Features & Use Cases

  • Data Fetching & Caching: Simplifies fetching, caching, synchronizing, and updating server state in React.
  • v5 Migration Assistance: Provides guidance on migrating from v4 to v5, highlighting breaking changes and new features.
  • Advanced Patterns: Covers optimistic updates, infinite scrolling, dependent queries, and prefetching.
  • Use Case: When building a dashboard that displays real-time data from multiple API endpoints, this Skill ensures data is fetched efficiently, cached appropriately, and updated seamlessly, providing a smooth user experience.

Quick Start

Use the tanstack-query skill to set up the QueryClientProvider and ReactQueryDevtools in your application's main entry point.

Frequently Asked Questions about tanstack-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage server state and data fetching in React applications?

TanStack Query manages server state in React by simplifying data fetching, caching, and synchronizing between the client and server. It ensures data from multiple API endpoints is fetched efficiently and updated seamlessly.

How do I migrate TanStack Query from v4 to v5?

Migrating from v4 to v5 involves addressing breaking changes like transitioning to object syntax, updating gcTime, replacing isPending, and handling keepPreviousData. The v5 migration process highlights these specific syntax updates and new features.

What is the best way to implement optimistic updates and infinite scrolling in React?

Optimistic updates and infinite scrolling are implemented using TanStack Query's advanced patterns like useMutationState and infiniteQueryOptions. These features manage server state efficiently to provide a seamless user experience.

How do I resolve SSR and hydration problems with streaming server components in React?

SSR and hydration problems with streaming server components are resolved by debugging the server state synchronization logic using TanStack Query. It assists in identifying and fixing hydration mismatches during the server-side rendering process.

Does TanStack Query work with offline network modes and PWAs?

TanStack Query works with offline network modes and PWAs through its advanced network mode features. This allows React applications to handle data fetching and server state synchronization even when network connectivity is unavailable.