1. The bidirectional data binding principles of VUe2 and VUe3 are different
The data binding of VUe2 is to use Object.definePropet () to hijack the data and implement vue3 using Proxy API to implement data Proxy
Differences between the two:
DefineProperty can only listen on a certain attribute, ProxyAPI can globally listen on the proxy can listen on the array, and it does not need to perform the opposite operation on the array alone, and it can detect the changes inside the array. Paoxy can directly bind the whole object, leaving out for in closure and other contents to improve efficiency
2. Vue3 implements lazy observation by default.
In VUe2.0, the data creates an observer from the very beginning. When the data is very large, there will be problems. In VUe3, it is optimized to create an observer only when the data is used to initialize the visible part of the rendering, which is more efficient.
Vue3.0 adds typeScript and PWA support
4. The project directory structure has changed
The configuration file directory has been removed from 2.x and the config and build folders. The relevant configuration in 3.x requires manual creation of vue.config.js in the root directory, such as cross-domain
5. Components send changes
Development component differences
6. More accurate notification of changes
In version x, when you add a property to an object using vue. set, all the watcher of that object is rerun; In version 3. X, only watcher that depends on that property will run again