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

关于 Fiber 架构的心智模型 的疑惑 #103

Open
iolh opened this issue Nov 2, 2021 · 0 comments
Open

关于 Fiber 架构的心智模型 的疑惑 #103

iolh opened this issue Nov 2, 2021 · 0 comments

Comments

@iolh
Copy link

iolh commented Nov 2, 2021

1635835128(1)

卡子哥,这节代数效应与Fiber中的描述是否有误?

所谓代数效应就是解耦程序逻辑和具体实现,目的是:

JS 中并没有代数效应的概念,Generator 污染外层函数也没有践行代数效应的理念,正因此 React 自己实现 Fiber,作为协程的一种实现,并且践行了代数效应,算是对 JS 的一种扩展。

结论:“所以,我们可以将纤程(Fiber)、协程(Generator)理解为代数效应思想在JS中的体现” 应该修改为 “所以,我们可以将纤程(Fiber)理解为代数效应思想在JS中的体现”。

不知描述是否有误,请多指教!

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