neroneroffy / react-source-code-debug

React 源码调试环境,源代码详细注释,跟随官方仓库进行更新
https://segmentfault.com/blog/react-secret?_ea=103006355
880 stars 155 forks source link

关于如何区分更新与初始化过程是说法,个人感觉有误 #5

Open nisandaye opened 2 years ago

nisandaye commented 2 years ago

源码中是通过current的alternate属性判断workInProgress是否为null。而不是current是否为空吧?

neroneroffy commented 2 years ago

源码中是通过current的alternate属性判断workInProgress是否为null。而不是current是否为空吧?

您说的是beginWork那里吗?