当前位置:网站首页>Native DOM vs. virtual DOM
Native DOM vs. virtual DOM
2022-06-26 01:09:00 【Nanchu】
- First , We need to figure out two concepts , What is primordial dom, What is virtual dom?
- Traditional development model
- Native JS or JS operation DOM when , The browser will build DOM The tree starts the process from the beginning to the end .
- In one operation , I need to update 10 individual DOM node , The browser receives the first DOM I didn't know there was 9 Update operations , So the process will be executed immediately , Final execution 10 Time .
- fictitious DOM
- Web The interface consists of DOM Trees ( Tree means data structure ) To build , When part of it changes , In fact, it corresponds to a DOM The node has changed .
- In one operation 10 Secondary update DOM The action of , fictitious DOM No immediate action DOM, It's about putting 10 Updated diff Save the content to a local JS In the object , In the end JS Object one time attch To DOM on the tree , Follow up , Avoid a lot of unnecessary calculations .
- fictitious DOM The benefits of
- use JS Object simulation DOM The benefits of nodes are , The update of the page can be reflected in JS object ( fictitious DOM) On , Operate... In memory JS Objects are obviously faster , After the update is completed , And finally JS Objects are mapped to real DOM, It's up to the browser to draw .
边栏推荐
- mysql错误代码2003的解决办法
- ciscn_2019_en_2
- The maze of God's perspective in robot vision
- Redis strings command
- Online gadget sharing (updated from time to time, current quantity: 2)
- Px4 system terminal for pixhawk
- 213. house raiding II
- Send mail tool class
- react + router 框架下的路由跳转后缓存页面存初始参数
- Dgus new upgrade: fully support digital video playback function
猜你喜欢
. Net using access 2010 database
返回值为Object型方法调用equals()
FPGA notes -- implementation of FPGA floating point operation
Vscode shortcut
The maze of God's perspective in robot vision
Nacos注册中心
Download and install flume
QT cmake pure C code calls the system console to input scanf and Chinese output garbled code
Unified gateway
Ad20 (Altium designer) PCB highlight network
随机推荐
Electronic training.
JS逆向案例:破解登录密码
CXF
数组中的第K个最大元素
Cartoon shader
ADC acquisition noise and comparison between RMS filter and Kalman filter
计算机网络知识总结(面试)
containerd客户端比较
Unified gateway
Send mail tool class
ciscn_ 2019_ en_ two
vite打包构建时 @charset utf-8警告问题处理;
Typescript for Web Learning
Chapter V exercises (124, 678, 15, 19, 22) [microcomputer principles] [exercises]
Development and monitoring of fusion experiment pulse power supply by LabVIEW
Inheritance -- holy grail mode
Nacos注册中心
Anaconda beginner's notes
Design and process analysis of anti backflow circuit for MOS transistor
Blob