Home / Function/ installComponentHooks() — vue Function Reference

installComponentHooks() — vue Function Reference

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

Function typescript CoreRuntime Instance calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  d19a39ef_bd3e_4808_da35_290ad3dfb2d0["installComponentHooks()"]
  a6875054_df8a_0ce4_8a16_374ce422dc53["create-component.ts"]
  d19a39ef_bd3e_4808_da35_290ad3dfb2d0 -->|defined in| a6875054_df8a_0ce4_8a16_374ce422dc53
  cd4ab087_1a92_967b_8b0c_652f9562b5f0["createComponent()"]
  cd4ab087_1a92_967b_8b0c_652f9562b5f0 -->|calls| d19a39ef_bd3e_4808_da35_290ad3dfb2d0
  feeda1fc_11f4_9f58_6f94_938316f35164["mergeHook()"]
  d19a39ef_bd3e_4808_da35_290ad3dfb2d0 -->|calls| feeda1fc_11f4_9f58_6f94_938316f35164
  style d19a39ef_bd3e_4808_da35_290ad3dfb2d0 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, defined in src/core/vdom/create-component.ts.
Where is installComponentHooks() defined?
installComponentHooks() is defined in src/core/vdom/create-component.ts at line 232.
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