Vue · Senior · Question 52 of 75
What does deep: 2 on a watcher do (Vue 3.5+)?
- ✓Correct answer: Tracks nested changes only up to two levels deep
- 2Runs the callback twice
- 3Delays the callback by two ticks
Explanation
Deep watching of huge objects traverses everything on each change. Limiting depth reduces that cost.