Vue 3 supports two styles for authoring component logic. The Options API organises code by option type — `data`, `methods`, `computed`, `watch`, `mounted`, etc. — inside an exported object. This style feels familiar to Vue 2 developers and is still fully supported and recommended for simpler components or teams migrating from Vue 2.
The Composition API, introduced in Vue 3, lets you group related logic together using functions like `ref`, `reactive`, `computed`, and `watch` inside a `setup()` function or the `