What problem does it solve?
This Skill addresses the complexities of fetching, caching, and managing asynchronous data in React applications, ensuring a smooth user experience with loading and error states.
Core Features & Use Cases
- Data Fetching & Caching: Utilizes TanStack Query for efficient data retrieval and caching.
- Loading & Error States: Provides clear visual feedback during data loading and handles errors gracefully.
- Mutations & Optimistic Updates: Enables data modification with immediate UI feedback.
- Infinite Scroll & Pagination: Supports fetching large datasets in manageable chunks.
- Dependent Queries: Manages data dependencies between different queries.
- Prefetching: Improves perceived performance by fetching data proactively.
- Server Components: Integrates with Next.js Server Components for data fetching at the framework level.
Quick Start
Use the data-fetching skill to implement a user profile component that fetches user data by ID and displays loading or error states.