vue-best-practices

Identify and codify Vue 3 best practices for reactivity, components, and performance.

2|Updated Jun 13, 2023
One-click install
npx skills add https://github.com/joaoprocopio/tooling --skill vue-best-practices-joaoprocopio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vue-best-practices
Source: https://github.com/joaoprocopio/tooling/tree/main/skills/vue-best-practices
Command: npx skills add https://github.com/joaoprocopio/tooling --skill vue-best-practices-joaoprocopio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Vue 3 applications often fall into common pitfalls around reactivity, component design, and performance. This Skill aggregates official best practices to help you write robust, maintainable Vue code and avoid frequent gotchas.

Core Features & Use Cases

  • Enforces Composition API idioms and clear state management patterns to keep code predictable.
  • Covers reactivity pitfalls, computed vs. methods, watchers, component communication, and template performance.
  • Provides quick-start guidance and references for day-to-day development.

Quick Start

Apply the Vue best practices outlined here to your project to improve reliability and performance.

Frequently Asked Questions about vue-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I avoid common reactivity pitfalls in Vue 3 when using the Composition API?

Avoid Vue 3 reactivity pitfalls by following established Composition API patterns like preventing direct computed value mutations and using clear state management. This keeps component interactions predictable and maintainable.

What is the best way to structure Vue 3 components for scalable applications?

The best way to structure scalable Vue 3 components is to enforce clear communication patterns and proper lifecycle hook registration. Adopting solid design guardrails prevents frequent architectural gotchas as your application grows.

When should I use keep-alive and computed properties versus methods in Vue 3?

Use keep-alive for component caching and choose computed properties for reactive dependencies versus methods for non-reactive operations. Applying these Vue performance tuning practices optimizes template rendering and overall application responsiveness.

Does this Vue 3 best practices guidance cover composable naming conventions and watchers?

Yes, this Vue 3 guidance explicitly covers composable naming conventions, watcher implementation, and template performance tuning. It aggregates official rules to help you write robust code and avoid common development mistakes.

Why should I not mutate computed values directly in my Vue 3 application?

You should not mutate computed values directly in Vue 3 because it breaks predictable state management and violates established guardrails. Following strict Composition API idioms ensures your application data flow remains robust and maintainable.