What problem does it solve?
This Skill provides modern data fetching and state management patterns using TanStack Query v5. It simplifies complex server state synchronization, caching, and mutations, reducing boilerplate and improving the user experience in React applications.
Core Features & Use Cases
- Suspense-based Queries: Leverage
useSuspenseQuery for cleaner components and integrated loading states with React Suspense.
- Mutations & Optimistic Updates: Manage data modifications with
useMutation, including optimistic updates for a snappier UI.
- Cache Management: Implement intelligent cache invalidation, manual updates, and prefetching strategies to keep your data fresh and performant.
- Use Case: When building a new feature that displays a list of items and allows users to add new ones, this skill guides you in using
useSuspenseQuery for fetching and useMutation with optimistic updates for adding, ensuring a smooth user experience.
Quick Start
Use the tanstack-query skill to create a new useSuspenseQuery hook for fetching a list of posts.