Vue · Senior · Question 16 of 75
Why might wrapping large API data in reactive/ref be costly, and what is the alternative?
- ✓Correct answer: Deep reactivity proxies every nested object on access; use
shallowRef/shallowReactiveand replace data immutably - 2Reactive data can't be larger than 1 MB
- 3There is no cost; Vue reactivity is free
Explanation
Deep proxies add overhead on access and tracking. For large read-mostly data, shallow reactivity plus replacing the whole value keeps updates cheap.