Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一个简单的React模板以及一些React运作流程的简短分析 #42

Open
taikulawo opened this issue Apr 25, 2020 · 0 comments
Open

Comments

@taikulawo
Copy link
Collaborator

taikulawo commented Apr 25, 2020

我知道你看不懂的 😂

See the Pen Template of React by csstry (@tryfrontend) on CodePen.

<script async src="https://static.codepen.io/assets/embed/ei.js"></script>

比如React,点击一个button,从触发事件到virtual dom修改都是同步进行

以及Vue

都是触发渲染之后diff出来Node不同之后就patch这个Node,不存在diff出来差别之后异步等到下一个周期才更新,也不存在diff完node之后统一patch,都是找出来不同就直接修改,树的深度优先遍历

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant