Vue · Junior · Question 5 of 75
What is the difference between the Options API and the Composition API?
- ✓Correct answer: Options API groups code by option type (
data,methods); Composition API groups it by feature using imported functions - 2The Options API only works with TypeScript
- 3The Composition API is a separate library that replaces Vue
Explanation
Both are supported in Vue 3. The Composition API (usually via <script setup>) makes logic reuse with composables and TypeScript inference easier; the Options API is still fine for simpler components.