Vue · Middle · Question 5 of 75

When is shallowRef a better choice than ref?

Explanation

ref makes nested objects deeply reactive via Proxies, which costs time for huge structures. shallowRef tracks only .value replacement; use triggerRef if you mutate and need to force an update.

Further reading

Problem with a question

Vue · Middle · question 5

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