Vue · Junior · Question 5 of 75

What is the difference between the Options API and the Composition API?

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.

Further reading

Problem with a question

Vue · Junior · question 5

Test yourself

Take the Vue · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz