---
id: wiki-2026-0508-options-api
title: Vue Options API
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [Options API, Vue 2 Options API, Vue Options]
duplicate_of: none
source_trust_level: A
confidence_score: 0.9
verification_status: applied
tags: [vue, vue2, options-api, frontend, framework]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: JavaScript
framework: Vue
---
# Vue Options API
## 매 한 줄
> **"매 Vue 2 의 object-shape component"**. Options API 매 `data()`, `computed`, `methods`, `watch`, lifecycle hook 의 named option 으로 component 정의. Vue 3 매 Composition API 가 default 이지만 Options API 매 여전히 supported — 매 small component / Vue 2 migration / 매 OOP 친화 팀의 sweet spot.
## 매 핵심
### 매 구조
- `data()` — reactive state factory.
- `computed` — derived state (cached).
- `methods` — handler / utility.
- `watch` — side effect on change.
- `props` — typed input.
- Lifecycle: `beforeCreate`, `created`, `beforeMount`, `mounted`, `beforeUpdate`, `updated`, `beforeUnmount`, `unmounted`.
### 매 vs Composition API
- **Options**: 매 organization by *option type* (all data together, all methods together).
- **Composition**: 매 organization by *feature* (state + logic for one concern colocated).
- 매 small / simple component → Options 매 OK. Large → Composition.
### 매 응용
1. 매 Vue 2 codebase 의 maintenance.
2. Junior-friendly component (매 명확한 named slot).
3. CMS / form-heavy app (매 state simple).
4. Migration: 매 Options → Composition 점진.
## 💻 패턴
### Basic Options component
```vue