Performance Optimization
-
object.defineProperty --> Proxy
-
virtual DOM reconstruction (twice as fast than 2.5) [and the size of the template -> and the number of dynamic content in a template-related]
-
Tradition: the component update, you need to recreate the entire vdom tree, then traverse carried out diff, update
-
The new update strategy: block tree
-
Distinguish between static and dynamic node node
-
Dynamic instruction node (v-if, v-for, {{name}}, etc.) Update
-
Compile-time optimization
-
slot as a function of default compiler
-
vnode create a function to keep the parameters of the agreement
-
Generating type flag when compiling vnode
api
-
Undo class API (better support ts)
-
Use function-based API
-
-
Contrast react Hooks:
-
The same logical combination, multiplexing capability
-
Called only once
-
Intuition line with js
-
No closure variable problem
-
No memory / gc pressure
-
Inline callback problem always leads to sub-assemblies to update does not exist
-
-