TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Demystifying React's Virtual DOM

19 点作者 gzeus将近 7 年前

3 条评论

kowdermeister将近 7 年前
The article suggests that using virtual DOM you can avoid the 6 steps described after<p><pre><code> document.querySelector(&#x27;#elementId&#x27;).innerHTML=&quot;New Value&quot; </code></pre> But this is not the case, the virtual DOM ensures you that if you have a complex component it will only update the nodes that actually needs updating, but the 6 steps still must take place.<p><a href="https:&#x2F;&#x2F;reactjs.org&#x2F;docs&#x2F;rendering-elements.html#react-only-updates-whats-necessary" rel="nofollow">https:&#x2F;&#x2F;reactjs.org&#x2F;docs&#x2F;rendering-elements.html#react-only-...</a>
darepublic将近 7 年前
this article is really misleading.. the authors writes as if direct Dom manipulation is slower than react, then uses a strawman of someone just changing a huge chunk of the Dom tree at once when only a text label needed to be changed. no good developer ever does that. reacts selling point is not blazing speed imo it&#x27;s good performance (not best) with the plus side of being easier to write good code.
评论 #17513699 未加载
评论 #17513492 未加载
评论 #17514202 未加载
评论 #17513597 未加载
chadlavi将近 7 年前
*remystifying