
Vue Options Api Best Practices
If you're still writing Vue components with the Options API (whether by choice or because you're maintaining an existing codebase), this skill covers the TypeScript integration points that actually matter. It tackles the specific pain points where `this` context goes sideways, prop validators lose type safety, and provide/inject becomes a typing nightmare. The references focus on real gotchas like why arrow functions break your methods and how debounced functions can bleed state between instances. It's not trying to convince you to use Options API over Composition API. It just assumes you already are and need the patterns that work.
- skills.sh installs
- 2.1K
- GitHub stars
- 2.7K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add hyf0/vue-skills --skill vue-options-api-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
Files
Vue.js Options API best practices, TypeScript integration, and common gotchas.
TypeScript
- Need to enable TypeScript type inference for component properties → See ts-options-api-use-definecomponent
- Enabling type safety for Options API this context → See ts-strict-mode-options-api
- Using old TypeScript versions with prop validators → See ts-options-api-arrow-functions-validators
- Event handler parameters need proper type safety → See ts-options-api-type-event-handlers
- Need to type object or array props with interfaces → See ts-options-api-proptype-complex-types
- Injected properties missing TypeScript types completely → See ts-options-api-provide-inject-limitations
- Complex computed properties lack clear type documentation → See ts-options-api-computed-return-types
Sponsors
Details
- Repository
- github.com/hyf0/vue-skills
- Categories
- Frontend Development, Backend & APIs
- First seen
- May 16, 2026