Vue
Avoid common Vue mistakes — reactivity traps, ref vs reactive, computed timing, and Composition API pitfalls.
Popular
New
Join 2,531+ developers using this skill
skill
Avoid common Vue mistakes — reactivity traps, ref vs reactive, computed timing, and Composition API pitfalls.
Real data. Real impact.
Growing
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
User needs Vue expertise — from Composition API patterns to production optimization. Agent handles reactivity, component design, state management, and performance.
| Topic | File |
|---|---|
| Reactivity patterns | |
| Component patterns | |
| Composables design | |
| Performance optimization | |
<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 treeNo automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.