refactor(suspense): make suspense tree-shakeable

This commit is contained in:
Evan You
2019-10-29 12:30:09 -04:00
parent 5cce23f4c6
commit 17d71fa407
5 changed files with 507 additions and 436 deletions

View File

@@ -149,3 +149,13 @@ function hasPropsChanged(prevProps: Data, nextProps: Data): boolean {
}
return false
}
export function updateHOCHostEl(
{ vnode, parent }: ComponentInternalInstance,
el: object // HostNode
) {
while (parent && parent.subTree === vnode) {
;(vnode = parent.vnode).el = el
parent = parent.parent
}
}