What problem does it solve?
This Skill provides clear, actionable guidelines and best practices for writing modern Vue 3 applications using the Composition API, ensuring maintainable, performant, and scalable code.
Core Features & Use Cases
- Component Policies: Enforces type-safe props, named emits, and the use of
defineModel for two-way binding.
- State Management: Recommends
ref over reactive and emphasizes using InjectionKey with provide/inject.
- Reactivity & Performance: Guides on
watch vs. watchEffect, using shallowRef for large objects, and performance optimizations like defineAsyncComponent and v-memo.
- Anti-Patterns: Highlights common mistakes and provides correct alternatives.
- Use Case: A developer starting a new Vue 3 project can use this Skill to establish a consistent coding standard for their team, preventing common pitfalls and improving code quality from the outset.
Quick Start
Apply the Vue 3 Composition API best practices to the provided code snippet.