MCPcopy Create free account
hub / github.com/Nynxz/ComfyUI-IdeogramHelper / createComponentInstance

Function createComponentInstance

web/main.js:6340–6428  ·  view source on GitHub ↗
(vnode, parent, suspense)

Source from the content-addressed store, hash-verified

6338const emptyAppContext = createAppContext();
6339let uid = 0;
6340function 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,

Callers 1

mountComponentFunction · 0.85

Calls 2

normalizePropsOptionsFunction · 0.85
normalizeEmitsOptionsFunction · 0.85

Tested by

no test coverage detected