Vue · Middle · Question 58 of 75
You mutate an array inside a shallowRef. Why doesn't the view update, and how do you fix it?
const rows = shallowRef([])
rows.value.push(newRow)- ✓Correct answer: Only
.valuereplacement is tracked; replace the array or calltriggerRef(rows) - 2
shallowRefcan't hold arrays - 3Call
nextTick()
Explanation
shallowRef skips deep reactivity for performance; you decide when the change is announced.