• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

从0开始学习Vue3-01-Vue2和Vue3的区别


Recommended Posts

升级带来的性能提升总结

1.模板编译优化:节点达到一定个数,会自动优化

每次重新渲染都会调用createVnode创建虚拟节点,VUE3会做静态提升,静态节点会被提取优化。

p3pknrjhd4e4753.png

mm121e3hczk4754.png

2.事件

缓存事件以防止它们被重新创建。

p41f4uoddjq4755.png

3.响应式原理

定义代理的属性

4.Vue3 diff算法,可以根据patchFlag做diff Vue2是全量的diff,最长递增子序列算法

5.options Api改为 compositionApi

用起来很方便。vue2的一个功能需要拆分成多个,但是composition使用起来更方便,拆分成一个功能。

6.Fragment多个根节点的支持、Teleport Suspense keep-alive transition

7.Vue2 flow 改为 Vue3 TS

8.Vue3li 有自定义渲染器

CreateRender()传入自己的渲染方法,根据Vue核心实现不同的平台代码。

9.代码管理升级

单一回购的管理模式

Link to comment
Share on other sites