Home / Function/ installComponentHooks() — vue Function Reference

installComponentHooks() — vue Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  c0fead27_e979_7178_460e_4131319cd448["installComponentHooks()"]
  97ceaa96_dc73_11db_99c0_3dfa1b31b53f["createComponent()"]
  97ceaa96_dc73_11db_99c0_3dfa1b31b53f -->|calls| c0fead27_e979_7178_460e_4131319cd448
  fceee0e1_3ae0_a147_4e7a_36d1b311cb28["mergeHook()"]
  c0fead27_e979_7178_460e_4131319cd448 -->|calls| fceee0e1_3ae0_a147_4e7a_36d1b311cb28
  style c0fead27_e979_7178_460e_4131319cd448 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/vdom/create-component.ts lines 232–243

function installComponentHooks(data: VNodeData) {
  const hooks = data.hook || (data.hook = {})
  for (let i = 0; i < hooksToMerge.length; i++) {
    const key = hooksToMerge[i]
    const existing = hooks[key]
    const toMerge = componentVNodeHooks[key]
    // @ts-expect-error
    if (existing !== toMerge && !(existing && existing._merged)) {
      hooks[key] = existing ? mergeHook(toMerge, existing) : toMerge
    }
  }
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does installComponentHooks() do?
installComponentHooks() is a function in the vue codebase.
What does installComponentHooks() call?
installComponentHooks() calls 1 function(s): mergeHook.
What calls installComponentHooks()?
installComponentHooks() is called by 1 function(s): createComponent.

Analyze Your Own Codebase

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

Try Supermodel Free