What problem does it solve?
This Skill helps you efficiently manage server state in React applications, simplifying data fetching, caching, and synchronization, and resolving common migration issues from v4 to v5.
Core Features & Use Cases
- Server State Management: Use hooks like
useQuery and useMutation for robust data handling.
- v4 to v5 Migration: Addresses breaking changes like object syntax,
gcTime, isPending, and placeholderData.
- Advanced Patterns: Implements optimistic updates, infinite scrolling, prefetching, and error handling with
throwOnError.
- Use Case: Integrate TanStack Query into your React app to fetch user data, manage form submissions with instant UI feedback, and ensure data consistency across your application, all while leveraging the latest v5 features.
Quick Start
Use the tanstack-query skill to set up the QueryClientProvider and ReactQueryDevtools in your main application file.