Vue
Versions checked on 2026-10-15: Vue 3.5.44 stable and 3.6.0-rc.11 (Vapor Mode), Pinia 4.1, Vue Router 5.4, VueUse 15.0, Vitest 5.0.
Workflow
- Check the stack first. Read
package.jsonfor the majors of vue, pinia, vue-router and @vueuse/core, and match the style the project already uses. New code defaults to the Composition API with<script setup lang="ts">. Options API projects follow options-api; JSX projects follow jsx. - Load the four core references before the first edit and apply them for the whole task: reactivity, sfc, component-data-flow, composables.
- Map components before building a feature with more than one part. Write one sentence of responsibility per component, plus its props and emits. Route views compose children; they do not hold feature logic.
- Add optional features only when the requirement calls for them: slots, KeepAlive, Teleport, Suspense, transitions, directives, render functions, plugins. workflow has the full decision list and the final self-check.
- Optimize after it works. Performance work starts from a measurement; see the
vue-performanceskill.
Rules that prevent most Vue bugs
- Derive values with
computed. Usewatchonly for side effects, and clean up withonWatcherCleanup. - Keep source state small. Use
shallowReffor large data that is replaced wholesale and for third-party instances. - Props are read-only. Two-way bindings go through
defineModel; events are typed withdefineEmits. - Destructuring
reactive()or a store breaks reactivity. UsetoRefs()orstoreToRefs(). - Use
useTemplateRef('name')for template refs. VueUse 15 removedtemplateRef. - Composables that accept inputs take
MaybeRefOrGetterand read them withtoValue()inside effects. See adaptable-composables. - API data belongs in a query layer (
vue-dataskill), not in Pinia stores with hand-rolledloadingflags.
Reference map
| Topic | Start here |
|---|---|
| Core concepts, curated by the Vue team | workflow, then core/ |
| API surface: macros, reactivity, lifecycle, built-ins | api-guide |
| Vue 3.6 RC and Vapor Mode | vue-36-vapor |
| Pinia 4 | pinia-guide, pitfalls in pinia-gotchas |
| Vue Router 5 | router-v5, pitfalls in router-gotchas |
| Testing with Vitest, Vue Test Utils and Playwright | testing-guide |
| VueUse 15, about 270 functions | vueuse-guide |
| Options API and JSX codebases | options-api, jsx |
Related skills: vue-debug for errors and console warnings, vue-review for reviewing a diff, vue-upgrade for version bumps, plus vue-data, vue-forms, vue-performance, vue-a11y, vue-ui and vue-clean-components.
