What problem does it solve?
This Skill streamlines modern data fetching in React applications by providing patterns and best practices for using TanStack Query v5, ensuring efficient, robust, and maintainable data management.
Core Features & Use Cases
- Efficient Data Fetching: Leverages
useSuspenseQuery for seamless integration with React Suspense, eliminating manual loading and error states in components.
- State Management: Manages server state, cache invalidation, and optimistic updates for mutations.
- API Integration: Demonstrates patterns for centralized API services and structured query keys.
- Use Case: When building a dashboard that displays user profiles and their associated posts, use this Skill to efficiently fetch and manage the data, ensuring a smooth user experience with automatic cache updates and optimistic UI changes.
Quick Start
Use the tanstack-query skill to fetch a list of posts using useSuspenseQuery and display them in a component.