Explain briefly the difference between computed and Watch

computed

Computed looks like a method, but it really counts attributes. It dynamically displays new calculations based on the data you rely on. Computed results are cached. Computed values are not cached after the getter is executed. The next time a computed value is retrieved, the corresponding getter is invoked only after the property value it depends on has changed.

watch

Watch is more like a data listening callback for data. When the dependent data’s data changes, the callback is executed, passing in newVal and oldVal in the method. You can provide scenarios where input values are invalid, providing intermediate values. The Vue instance will call $watch() at instantiation time, iterating through each property of the Watch object. If you need to do something when some data changes, use Watch.