const mountComponent:MountComponentFn=(
initialVNode,
container,
anchor,
parentComponent,
parentSuspense,
isSVG,
optimized
)=>{// 2.x compat may pre-create the component instance before actually// mountingconst compatMountInstance =
__COMPAT__ && initialVNode.isCompatRoot && initialVNode.component
const instance: ComponentInternalInstance =
compatMountInstance ||(initialVNode.component =createComponentInstance(
initialVNode,
parentComponent,
parentSuspense
))......setupComponent(instance)// setup() is async. This component relies on async logic to be resolved// before proceedingif(__FEATURE_SUSPENSE__ && instance.asyncDep){
parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect)// Give it a placeholder if this is not hydration// TODO handle self-defined fallbackif(!initialVNode.el){const placeholder =(instance.subTree =createVNode(Comment))processCommentNode(null, placeholder, container!, anchor)}return}setupRenderEffect(
instance,
initialVNode,
container,
anchor,
parentSuspense,
isSVG,
optimized
)if(__DEV__){popWarningContext()endMeasure(instance,`mount`)}}