Home / Function/ createComponentInstanceForVnode() — vue Function Reference

createComponentInstanceForVnode() — vue Function Reference

Architecture documentation for the createComponentInstanceForVnode() function in create-component.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  3146b73e_f08e_cdcd_7d95_38e388619c9d["createComponentInstanceForVnode()"]
  a6875054_df8a_0ce4_8a16_374ce422dc53["create-component.ts"]
  3146b73e_f08e_cdcd_7d95_38e388619c9d -->|defined in| a6875054_df8a_0ce4_8a16_374ce422dc53
  19787e7b_3f94_47ad_9431_ec3405d28883["componentVNodeHooks.init()"]
  19787e7b_3f94_47ad_9431_ec3405d28883 -->|calls| 3146b73e_f08e_cdcd_7d95_38e388619c9d
  style 3146b73e_f08e_cdcd_7d95_38e388619c9d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/vdom/create-component.ts lines 212–230

export function createComponentInstanceForVnode(
  // we know it's MountedComponentVNode but flow doesn't
  vnode: any,
  // activeInstance in lifecycle state
  parent?: any
): Component {
  const options: InternalComponentOptions = {
    _isComponent: true,
    _parentVnode: vnode,
    parent
  }
  // check inline-template render functions
  const inlineTemplate = vnode.data.inlineTemplate
  if (isDef(inlineTemplate)) {
    options.render = inlineTemplate.render
    options.staticRenderFns = inlineTemplate.staticRenderFns
  }
  return new vnode.componentOptions.Ctor(options)
}

Domain

Subdomains

Frequently Asked Questions

What does createComponentInstanceForVnode() do?
createComponentInstanceForVnode() is a function in the vue codebase, defined in src/core/vdom/create-component.ts.
Where is createComponentInstanceForVnode() defined?
createComponentInstanceForVnode() is defined in src/core/vdom/create-component.ts at line 212.
What calls createComponentInstanceForVnode()?
createComponentInstanceForVnode() is called by 1 function(s): componentVNodeHooks.init.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free