当前位置:网站首页>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 .
边栏推荐
- The maze of God's perspective in robot vision
- Typescript for Web Learning
- 如何有效地推广产品
- MySQL custom function instance
- vite打包构建时 @charset utf-8警告问题处理;
- Is it safe for flush software to buy stocks for trading? How to open an account to buy shares
- Digital circuit - adder
- jarvisoj_level2_x64
- Flex & Bison 开始
- 数字电路——加法器
猜你喜欢

Dgus new upgrade: fully support digital video playback function

JS reverse case: cracking login password

Redis的安装及启动

多接口调用,使用Promise.all、Promise.race和Promise.any

马斯克 VS 乔布斯,谁是21世纪最伟大的创业家

Casually painted

C IO stream (I) basic concept_ Basic definition

Idea view unit test coverage

Freertos+stm32l+esp8266+mqtt protocol transmits temperature and humidity data to Tencent cloud IOT platform

STM32 uses SPI mode to drive TFT-LCD optimization code of hx8347 scheme
随机推荐
Computer network knowledge summary (interview)
继承--圣杯模式
如何有效地推廣產品
新库上线 | CnOpenData农产品批发价格数据
Android cache usage tool class
Kylin
Cartoon shader
经典面试题之老鼠试药与汉明码
黑盒测试 — 测试用例 之 判定表法看这一篇就够了
Nacos registry
Sword finger offer II 096 String interleaving
About EF page turning query database
213. house raiding II
Binary sort tree
ADC acquisition noise and comparison between RMS filter and Kalman filter
数组中的第K个最大元素
QT cmake pure C code calls the system console to input scanf and Chinese output garbled code
Ad20 (Altium designer) PCB highlight network
Summary of push-pull output and open drain output of STM32 and failure of analog IIC driving mlx90615
[understanding of opportunity -30]: Guiguzi - internal "chapter - empathy, stand on the other side's position and narrow the psychological distance with the other side