(vnode, parent, suspense)
| 6338 | const emptyAppContext = createAppContext(); |
| 6339 | let uid = 0; |
| 6340 | function createComponentInstance(vnode, parent, suspense) { |
| 6341 | const type = vnode.type; |
| 6342 | const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; |
| 6343 | const instance = { |
| 6344 | uid: uid++, |
| 6345 | vnode, |
| 6346 | type, |
| 6347 | parent, |
| 6348 | appContext, |
| 6349 | root: null, |
| 6350 | // to be immediately set |
| 6351 | next: null, |
| 6352 | subTree: null, |
| 6353 | // will be set synchronously right after creation |
| 6354 | effect: null, |
| 6355 | update: null, |
| 6356 | // will be set synchronously right after creation |
| 6357 | job: null, |
| 6358 | scope: new EffectScope( |
| 6359 | true |
| 6360 | /* detached */ |
| 6361 | ), |
| 6362 | render: null, |
| 6363 | proxy: null, |
| 6364 | exposed: null, |
| 6365 | exposeProxy: null, |
| 6366 | withProxy: null, |
| 6367 | provides: parent ? parent.provides : Object.create(appContext.provides), |
| 6368 | ids: parent ? parent.ids : ["", 0, 0], |
| 6369 | accessCache: null, |
| 6370 | renderCache: [], |
| 6371 | // local resolved assets |
| 6372 | components: null, |
| 6373 | directives: null, |
| 6374 | // resolved props and emits options |
| 6375 | propsOptions: normalizePropsOptions(type, appContext), |
| 6376 | emitsOptions: normalizeEmitsOptions(type, appContext), |
| 6377 | // emit |
| 6378 | emit: null, |
| 6379 | // to be set immediately |
| 6380 | emitted: null, |
| 6381 | // props default value |
| 6382 | propsDefaults: EMPTY_OBJ, |
| 6383 | // inheritAttrs |
| 6384 | inheritAttrs: type.inheritAttrs, |
| 6385 | // state |
| 6386 | ctx: EMPTY_OBJ, |
| 6387 | data: EMPTY_OBJ, |
| 6388 | props: EMPTY_OBJ, |
| 6389 | attrs: EMPTY_OBJ, |
| 6390 | slots: EMPTY_OBJ, |
| 6391 | refs: EMPTY_OBJ, |
| 6392 | setupState: EMPTY_OBJ, |
| 6393 | setupContext: null, |
| 6394 | // suspense related |
| 6395 | suspense, |
| 6396 | suspenseId: suspense ? suspense.pendingId : 0, |
| 6397 | asyncDep: null, |
no test coverage detected