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 Fiber #47

Open
jangdelong opened this issue Jan 6, 2022 · 0 comments
Open

React Fiber #47

jangdelong opened this issue Jan 6, 2022 · 0 comments

Comments

@jangdelong
Copy link
Contributor

jangdelong commented Jan 6, 2022

React Fiber 除了通过挂起,恢复和终止来控制更新外,还给每个任务分配了优先级。 具体点就是在创建或者更新FiberNode 的时候,通过算法给每个任务分配一个到期时间(expirationTime)。 在每个任务执行的时候除了判断剩余时间,如果当前处理节点已经过期,那么无论现在是否有空闲时间都必须执行该任务。

更新过程的可控主要体现在下面几个方面:

  • 任务拆分
  • 任务挂起、恢复、终止
  • 任务具备优先级

https://www.zoo.team/article/about-react-fiber

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

No branches or pull requests

1 participant