Vue · Middle · Question 2 of 75
How does watchEffect differ from watch?
- ✓Correct answer:
watchEffectruns immediately and tracks whatever it reads;watchis lazy, has explicit sources and gives old and new values - 2
watchEffectonly runs once - 3
watchcan't be used with async callbacks
Explanation
watchEffect is concise when the effect uses the same state it depends on. watch gives precise control: only listed sources trigger it, and it can be immediate or once.