updateHostText
这个就简单了
tryToClaimNextHydratableInstance
是进行hydrate
的操作,也就是复用原本存在的root
的内部的DOM节点,详细可以看这里
因为是文字节点,也就不需要reconcileChildren
了
function updateHostText(current, workInProgress) {
if (current === null) {
tryToClaimNextHydratableInstance(workInProgress);
}
const nextProps = workInProgress.pendingProps;
memoizeProps(workInProgress, nextProps);
// Nothing to do here. This is terminal. We'll do the completion step
// immediately after.
return null;
}
results matching ""
No results matching ""
扫码添加Jokcy,更多更新更优质的前端学习内容不断更新中,期待与你一起成长!