vue-data
/vue-data
Server state and data fetching in Vue 3. Pinia Colada queries and mutations, caching, invalidation, optimistic updates, Vue Router data loaders, race conditions, abort, SSR payloads, and choosing between fetch layers. Use when fetching API data, caching server responses, handling loading and error states, or wiring mutations in a Vue app.
- Author
- kimjinwoo4 ↗
- Repository
- vue-skills ↗
- Licence
- MIT
- Last repository change
- 22.10.2026
Assessment and security
- Files in this package
- 4
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Server state and data fetching in Vue 3. Pinia Colada queries and mutations, caching, invalidation, optimistic updates, Vue Router data loaders, race conditions, abort, SSR payloads, and choosing between fetch layers. Use when fetching API data, caching server responses, handling loading and error states, or wiring mutations in a Vue app.
Original author description
Server state and data fetching in Vue 3. Pinia Colada queries and mutations, caching, invalidation, optimistic updates, Vue Router data loaders, race conditions, abort, SSR payloads, and choosing between fetch layers. Use when fetching API data, caching server responses, handling loading and error states, or wiring mutations in a Vue app.
How it works
- Core rule
- Decision table
- Checks before you finish
- References
SKILL.md preview
--- name: vue-data description: Server state and data fetching in Vue 3. Pinia Colada queries and mutations, caching, invalidation, optimistic updates, Vue Router data loaders, race conditions, abort, SSR payloads, and choosing between fetch layers. Use when fetching API data, caching server responses, handling loading and error states, or wiring mutations in a Vue app. --- # Vue Data Fetching Versions checked on 2026-10-15: @pinia/colada 1.4.8 (stable, works with Pinia 4), Vue Router 5.4 data loaders (still experimental), @tanstack/vue-query 5. Nuxt apps start with `useFetch` and `useAsyncData` (`nuxt` skill). ## Core rule Server state is not client state. API data does not belong in hand-written Pinia stores with `loading` and `error` flags. A query layer owns caching, deduplication, invalidation and the request lifecycle. Pinia stores keep state the client owns: session, preferences, drafts. ## Decision table | Situation | Use | |-----------|-----| | Vue SPA fetching REST or GraphQL | Pinia Colada `useQuery` and `useMutation` | | Data must be ready before the route renders | Data loaders (`defineColadaLoader`, `defineBasicLoader`) from `vue-router/experimental` | | Nuxt app | `useFetch` or `useAsyncData` (SSR payload, Nitro aware) | | Project already uses TanStack Query | Keep TanStack Vue Query | | One-off call with no cache impact, such as a form submit | `$fetch` or `ofetch` in the event handler | | Static lookup fetched once at startup | A composable with a module-level cache (not on SSR) | ## Checks before you finish - Every query key includes every input the request depends on. - Mutations invalidate or update the queries they affect. - Loading, error and empty states each render something deliberate. - Requests started by a watcher are cancelled or ignored when their inputs change. - On SSR, nothing user-specific is cached at module level. ## References | Topic | Path | |-------|------| | Pinia Colada: keys, invalidation, optimistic updates, SSR | [pinia-colada](references/pinia-colada.md) | | Data loaders with Vue Router 5 | [data-loaders](references/data-loaders.md) | | Race conditions, AbortSignal, error handling, layering | [patterns](references/patterns.md) |
Files in this package (4)
- SKILL.md 2 KB
- references/data-loaders.md 3 KB
- references/patterns.md 3 KB
- references/pinia-colada.md 4 KB
Versions
The database has no other skills named vue-data.
Database snapshot: 13.11.2026 · package version 86d5a3910c60 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100pinia-colada
Pinia Colada data fetching for Vue/Nuxt with useQuery, useMutation. Use for async state, query cache, SSR, or encountering invalidation, hydration, TanStack Vue Query migration errors. - 100pinia-colada-skilld
Data fetching layer for Vue built on Pinia. Use when writing, debugging, or reviewing code that imports @pinia/colada (pinia colada), including useQuery, useMutation, useInfiniteQuery, defineQuery, query cache invalidation, optimistic updates, plugins, SSR, or migrating from… - 100fec-data-fetching
Use when implementing or reviewing frontend server-state flows: typed queries, request caching, invalidation, mutations, optimistic updates, infinite queries, prefetch, SSR hydration, or API-layer integration. Do not use for local UI state or Service Worker caching; Chinese… - 100tanstack-query
TanStack Query for data fetching. Covers queries, mutations, and caching. Use for server state management in React. USE WHEN: user mentions "tanstack query", "react query", "data fetching", "API calls", asks about "cache management", "mutations", "infinite scroll", "optimistic… - 100rn-data-fetching
Use when fetching data from APIs in React Native: choosing between fetch+useEffect (didactic only) and TanStack Query (production default), wiring the QueryClient provider, building queries / mutations / optimistic updates / paginated and infinite lists / cache invalidation /… - 90TanStack Query
Expert guidance for TanStack Query (React Query) including queries, mutations, caching, invalidation, optimistic updates, pagination, and infinite queries. Use this when managing server state in React applications.