tanstack-query-docs

Document TanStack Query v5 hooks, QueryClient methods, and v4 migration.

2|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/manssorr/tanstack-query-plugin --skill tanstack-query-docs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tanstack-query-docs
Source: https://github.com/manssorr/tanstack-query-plugin/tree/main/skills/tanstack-query-docs
Command: npx skills add https://github.com/manssorr/tanstack-query-plugin --skill tanstack-query-docs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides comprehensive, version-aware documentation for TanStack Query (React Query) v5, helping developers quickly understand and implement its features, troubleshoot issues, and migrate from older versions.

Core Features & Use Cases

  • API Reference: Detailed explanations of useQuery, useMutation, useInfiniteQuery, and QueryClient methods.
  • Version Awareness: Includes guidance on v4 to v5 migration and checking installed versions.
  • Troubleshooting: Tips for common issues and how to check GitHub issues for solutions.
  • Use Case: A developer is unsure about the correct way to implement optimistic updates for a mutation. They can consult this Skill to find the exact onMutate, onError, and onSettled patterns with rollback examples.

Quick Start

Use the tanstack-query-docs skill to understand how to set up the QueryClientProvider.

Frequently Asked Questions about tanstack-query-docs

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

FAQPage Schema
How do I implement optimistic updates with useMutation in TanStack Query v5?

Optimistic updates in TanStack Query v5 use Mutation callbacks like onMutate, onError, and onSettled. The Skill provides exact patterns and rollback examples to manage cache state and handle errors during mutation operations.

What is the correct way to set up QueryClientProvider for React Query?

QueryClientProvider requires a QueryClient instance to manage cache and state. The Skill details how to instantiate the client and wrap your application components to enable data fetching hooks like useQuery and useMutation.

How do I migrate from TanStack Query v4 to v5?

Migrating from v4 to v5 involves updating API references and hook signatures. The Skill includes version awareness guidance and migration strategies to help developers transition their data fetching logic and state management code.

Does TanStack Query v5 work with TypeScript for data fetching?

TanStack Query v5 offers full TypeScript integration for data fetching and state management. The Skill covers type-safe implementations for useQuery, useInfiniteQuery, and useMutation to ensure robust API interactions.

Why is my useInfiniteQuery not fetching the next page of API data?

Troubleshooting useInfiniteQuery involves checking QueryClient methods and API response structures. The Skill provides tips for resolving common data fetching issues and guidance on checking GitHub issues for known solutions.