Vue · Middle · Question 53 of 75

How do you set component options like inheritAttrs: false in <script setup>?

defineOptions({ inheritAttrs: false })

Explanation

Before 3.3 a separate normal <script> block was needed. defineOptions can also set a component name.

Further reading

Problem with a question

Vue · Middle · question 53

Test yourself

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

Take this quiz