Build Vue 3 applications with Composition API, proper reactivity patterns, and production-ready components.
User needs Vue expertise — from Composition API patterns to production optimization. Agent handles reactivity, component design, state management, and performance.
| Topic | File |
|---|---|
| Reactivity patterns | reactivity.md |
| Component patterns | components.md |
| Composables design | composables.md |
| Performance optimization | performance.md |
<script setup> is the recommended syntax—cleaner and better performanceref for primitives—access with .value in script, auto-unwrapped in templatereactive can't reassign whole object—state = {...} breaks reactivityreactive loses reactivity—use toRefs(state) to preservearr[0] = x works, unlike Vue 2reactive({count: ref(0)}).count is number, not refcomputed for derived state—cached, recalculates only when dependencies changewatch for side effects—when you need to DO something in response to changescomputed should be pure—no side effects, no asyncwatchEffect for immediate reaction with auto-tracked dependenciesdeep: true—or watch a getter functionwatch is lazy by default—use immediate: true for initial runwatch(source, (newVal, oldVal) => {})watchEffect can't access old value—use watch if you need old/new comparisonconst stop = watch(...); stop()defineProps for type-safe props—defineProps<{ msg: string }>()defineEmits for type-safe events—defineEmits<{ (e: 'update', val: string): void }>()v-model is :modelValue + @update:modelValue—custom v-model with defineModel()default: () => ({})ref="name" + const name = ref(null)—names must match exactlyonMounted, not during setupref on component gives component instance—ref on element gives DOM elementv-for becomes array of refsonMounted for DOM access—component mounted to DOMonUnmounted for cleanup—subscriptions, timers, event listenersonBeforeMount runs before DOM insert—rarely needed but exists<Suspense> wrapperprovide('key', value) in parent—inject('key') in any descendantinject('key', defaultVal)—third param for factory functionuseRoute for current route—reactive, use in setupuseRouter for navigation—router.push('/path')beforeEach, beforeResolve, afterEach—return false to cancel<RouterView> with named views—multiple views per routev-if vs v-show—v-if removes from DOM, v-show toggles displayv-for required—v-for="item in items" :key="item.id".prevent.stop vs .stop.prevent<Teleport to="body"> renders outside component treed8f6cf2
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.