TanStack Query v5 Mastery

•
117
•

Optimizes React server state management using modern TanStack Query v5 patterns, optimistic updates, and efficient data fetching.

This skill enhances Claude Code's ability to manage server state in React using TanStack Query v5 best practices. It streamlines complex tasks such as implementing optimistic updates, tracking cross-component mutations, and configuring robust offline-first network modes. By enforcing v5-specific patterns—like mandatory object syntax and the removal of legacy query callbacks—this skill prevents common migration errors and ensures production-grade, memory-optimized data fetching logic.

主要功能

01117 GitHub stars
02Simplified optimistic updates using mutation variables
03Cross-component mutation tracking with useMutationState
04Offline-first PWA support via configurable Network Mode
05Comprehensive v4 to v5 migration error prevention and fixes
06Memory-optimized infinite queries with maxPages management

使用场景

01Synchronizing UI state across multiple components using mutation tracking
02Migrating legacy React Query v4 codebases to TanStack Query v5 standards
03Implementing high-performance, infinite-scrolling lists with memory constraints