Vue · Middle · Question 4 of 75
What does { deep: true } do on a watcher?
- ✓Correct answer: Triggers the callback on nested mutations inside the watched object, at the cost of traversing it
- 2Watches the component's child components
- 3Makes the watcher run before rendering
Explanation
Watching a reactive object directly is deep by default; watching a getter is not. Deep watching large structures is expensive - in 3.5 you can pass a number to limit depth.