Vue · Junior · Question 74 of 75
Which is the recommended default for reactive state in the Composition API?
- ✓Correct answer:
ref()- it works with any value type and keeps reactivity when passed around or destructured - 2
reactive()for everything - 3Plain
letvariables
Explanation
The Vue docs recommend ref as the primary API because reactive only works with objects and loses reactivity on destructuring or replacement.