---
name: vue-guidelines
description: Essential guidelines for Vue.js development. Always follow these rules when working with Vue project.
---
# Vue Guidelines
This document outlines best practices for building robust, maintainable, and modern Vue.js applications using the Composition API and TypeScript.
## 1. General Principles
- **Composition API**: Always use the Composition API with `
```
- **Emits**: Use `defineEmits` with type-only declarations.
```vue
```
## 3. Reactivity Fundamentals
- **ref vs reactive**: Prefer `ref` for most cases, especially for primitives and when you need to replace the entire object. Use `reactive` sparingly for grouped state where structure matters.
- **Unwrapping**: Remember `.value` is required in `