MCPcopy
hub / github.com/vuejs/core / processComponent

Function processComponent

packages/runtime-core/src/renderer.ts:1165–1200  ·  view source on GitHub ↗
(
    n1: VNode | null,
    n2: VNode,
    container: RendererElement,
    anchor: RendererNode | null,
    parentComponent: ComponentInternalInstance | null,
    parentSuspense: SuspenseBoundary | null,
    namespace: ElementNamespace,
    slotScopeIds: string[] | null,
    optimized: boolean,
  )

Source from the content-addressed store, hash-verified

1163 }
1164
1165 const processComponent = (
1166 n1: VNode | null,
1167 n2: VNode,
1168 container: RendererElement,
1169 anchor: RendererNode | null,
1170 parentComponent: ComponentInternalInstance | null,
1171 parentSuspense: SuspenseBoundary | null,
1172 namespace: ElementNamespace,
1173 slotScopeIds: string[] | null,
1174 optimized: boolean,
1175 ) => {
1176 n2.slotScopeIds = slotScopeIds
1177 if (n1 == null) {
1178 if (n2.shapeFlag & ShapeFlags.COMPONENT_KEPT_ALIVE) {
1179 ;(parentComponent!.ctx as KeepAliveContext).activate(
1180 n2,
1181 container,
1182 anchor,
1183 namespace,
1184 optimized,
1185 )
1186 } else {
1187 mountComponent(
1188 n2,
1189 container,
1190 anchor,
1191 parentComponent,
1192 parentSuspense,
1193 namespace,
1194 optimized,
1195 )
1196 }
1197 } else {
1198 updateComponent(n1, n2, optimized)
1199 }
1200 }
1201
1202 const mountComponent: MountComponentFn = (
1203 initialVNode,

Callers 1

patchFunction · 0.85

Calls 2

mountComponentFunction · 0.85
updateComponentFunction · 0.85

Tested by

no test coverage detected