What problem does it solve?
Migrating from TanStack Query v4 to v5 and implementing modern server-state patterns in React can be error-prone without a clear guide. This Skill consolidates migration steps, best practices, and practical examples to help teams adopt v5 features such as isPending, gcTime, placeholderData, networkMode, and infiniteQueryOptions, while preserving type safety and performance.
Core Features & Use Cases
- Migration guidance from v4 to v5, including object syntax enforcement, updated typings, and hydration strategies.
- Reusable query option factories (queryOptions) for useQuery, useSuspenseQuery, and prefetchQuery.
- Common patterns: dependent queries, parallel queries, infinite queries, optimistic updates, and prefetching.
- SSR hydration troubleshooting, error handling strategies, and DevTools integration for debugging.
Quick Start
Install @tanstack/react-query, initialize a single QueryClient with v5 defaults, wrap your app in QueryClientProvider, and consult the SKILL.md for migration steps and references.