1.虚拟 DOM 是使用对象对树结构的简单描述:
let vdom = {
type: 'p', // a <p> element
props: {
class: 'big', // with class="big"
children: [
'Hello World!' // and the text "Hello World!"
]
}
}
参考连接:preact.nodejs.cn/tutorial/01…
2.vue中虚拟dom 最早也是有react提出的模式,每个框架都有基于自己的实现,在vue中虚拟dom 如下结构:
3.虚拟dom 在挂载流程的位置
4.vue中为什么要引入虚拟dom
- 跨平台[解耦合,可以实现到不同平台的映射实现]
- 解决真实dom的频繁操作问题。
5- vue 虚拟dom 未来展望。 根据官方规划,再未来版本会使用无虚拟dom 方式。