midVue.js
What is the difference between Watch and WatchEffect?
Updated May 4, 2026
Short answer
watch is explicit and lazy; watchEffect is implicit and eager.
Deep explanation
watch tracks specific data sources and provides the old and new values. It doesn't run until the source changes. watchEffect automatically tracks every reactive property used inside its body and runs immediately upon declaration.
Real-world example
Use watch when you need the previous value to compare. Use watchEffect for simple logging or syncing data to localStorage.
Common mistakes
- Forgetting to stop a watcher if it was created dynamically (though Vue handles most auto-cleanup).
Follow-up questions
- How do you perform a deep watch?