Skip to content

Commit 34c317a

Browse files
committed
frontend
1 parent 5ab6d60 commit 34c317a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Leetcode Practices/frontend/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Leetcode 目前没考前端,只是在本路径下一致存放一些通用面试相关知识点
2+
3+
前端如 React 等框架也有使用算法和计算机基础知识(Computer System Layer 及设计模式)的地方,比如 Virtual DOM
4+
> React creates a tree of custom objects representing a part of the DOM. For example, instead of creating an actual DIV element containing a UL element, it creates a React.div object that contains a React.ul object. It can manipulate these objects very quickly without actually touching the real DOM or going through the DOM API. Then, when it renders a component, it uses this virtual DOM to figure out what it needs to do with the real DOM to get the two trees to match.
5+
> You can think of the virtual DOM like a blueprint. It contains all the details needed to construct the DOM, but because it doesn't require all the heavyweight parts that go into a real DOM, it can be created and changed much more easily.
6+
7+
参考自:https://stackoverflow.com/a/21965987/6481829
8+
9+
其中在对 Virtual DOM 的树与真实 DOM 的树的对比过程中包含了算法的技巧。而 Virtual DOM 的树数据结构则存放在内存中(与 Computer System Layer 相关)。

0 commit comments

Comments
 (0)