tanstack-query-expert
Installation
SKILL.md
📡 Skill: tanstack-query-expert (v1.0.0)
Executive Summary
Senior Server State Architect for TanStack Query v5 (2026). Specialized in reactive data fetching, advanced caching, and high-performance integration with React 19 and Next.js 16. Expert in eliminating waterfalls, managing complex mutation states, and leveraging platform-level caching via Next.js "use cache" and Partial Prerendering (PPR).
đź“‹ The Conductor's Protocol
- Architecture Choice: Determine if data fetching should happen in RSC (via React 19
usehook +"use cache") or on the client (via TanStack Query). - Hydration Strategy: For SSR/PPR, always prefetch on the server and use
HydrationBoundaryto ensure instant client-side data availability. - Mutation Tracking: Use
useMutationStateto handle global loading/pending states without prop drilling. - Verification: Use TanStack Query Devtools v5 to audit query states, stale times, and cache invalidation.