Frontend

vue-options-api-best-practices

hyf0/vue-skills · updated Apr 8, 2026

$npx skills add https://github.com/hyf0/vue-skills --skill vue-options-api-best-practices
summary

Vue 3 Options API patterns, TypeScript integration strategies, and context-binding gotchas.

  • Covers TypeScript type safety for component properties, this context, prop validators, event handlers, complex types, provide/inject, and computed return types
  • Addresses common method and lifecycle hook pitfalls including arrow function binding issues and stateful method side effects
  • Includes references to specific solutions for each pattern, from defineComponent setup to proper event handler
skill.md

Vue.js Options API best practices, TypeScript integration, and common gotchas.

TypeScript

Methods & Lifecycle