Comparison of Vue2.0 and Vue3.0DomDiff
In increasingly complex front-end applications, state management is a topic that is often mentioned. From the early slash-and-burn era to jQuery, and then to the current popular MVVM era, the form of state management has undergone earth-shaking changes. There is no need to maintain a large number of event callbacks and listeners to update the view. Instead, use two-way data binding. You only need to maintain the corresponding data state to automatically update the view, which greatly improves development efficiency. However, two-way data binding is not the only way. There is also a very rough and effective way: once the data changes, redraw the entire view, that is, reset Click on innerHTML. This approach is indeed simple, brutal, and effective, but if the entire view is updated only because of a small local data change, the cost-effectiveness is too low. Moreover, events, input boxes that acquire focus, etc., all need to be reprocessed. Therefore, for small applications or local small views, it is completely possible to do this, but it is not advisable for complex large-scale applications. In order to solve the problem that the view can be updated reasonably and efficiently under large and frequent data updates, Vue introduced…