Comparison between the watch, computed, and methods

1.computed --- Result properties are cached, unless responsive properties change dependent will be recalculated, mainly as a property to use;
2.methods --- it is a method of representing a specific operation, mainly writing business logic;
3.watch --- is an object, the key is the need to observe the expression, the corresponding value of the callback function is mainly used to monitor specific changes in the data, thereby performing certain business logic operation; can be seen as computed and the combination of methods.
   

Guess you like

Origin www.cnblogs.com/linm/p/12533352.html