just-react
just-react copied to clipboard
为什么rootFiber节点存在current(即rootFiber.alternate)
作者这里https://react.iamkasong.com/process/beginWork.html#effecttag说RootFiber在mount阶段就会有alternate的原因在双缓存那一节,究竟是什么原因,为什么我没有找到🥶
在 双缓存一节mount时的第二步,从图中你会发现有2个rootFiber, workInProgress rootFiber.alternate === current rootFiber
奥奥,是这样啊