What problem does it solve?
This Skill streamlines the migration of existing data-fetching patterns in a frontend application to TanStack Query, a powerful library for server-state management. It helps improve caching, reduce boilerplate, and enhance the overall data handling experience.
Core Features & Use Cases
- Automated Conversion: Converts
useAsyncData, useFetch, and manual ref() + await patterns to useQuery and useMutation.
- Standard Adherence: Ensures query keys follow established conventions and leverages an
api-client for fetching.
- Cache Management: Facilitates the implementation of cache invalidation and optimistic updates for mutations.
- Use Case: Migrating a Nuxt.js application's data fetching from
useAsyncData to TanStack Query to leverage its advanced caching and background update capabilities.
Quick Start
Convert the data fetching in the file '/src/pages/users/[id].vue' to use TanStack Query.