Home / Function/ componentVNodeHooks.insert() — vue Function Reference

componentVNodeHooks.insert() — vue Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  ccaa32c4_bdac_209e_5d8f_fe43093907de["componentVNodeHooks.insert()"]
  a7fb5d54_f5e0_5d73_5f6a_96e6c47acbeb["callHook()"]
  ccaa32c4_bdac_209e_5d8f_fe43093907de -->|calls| a7fb5d54_f5e0_5d73_5f6a_96e6c47acbeb
  a0d22394_0065_75a1_0c2e_857378683acf["queueActivatedComponent()"]
  ccaa32c4_bdac_209e_5d8f_fe43093907de -->|calls| a0d22394_0065_75a1_0c2e_857378683acf
  d5689118_f863_cb10_9794_80b2a5de55a7["activateChildComponent()"]
  ccaa32c4_bdac_209e_5d8f_fe43093907de -->|calls| d5689118_f863_cb10_9794_80b2a5de55a7
  style ccaa32c4_bdac_209e_5d8f_fe43093907de fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/vdom/create-component.ts lines 67–85

  insert(vnode: MountedComponentVNode) {
    const { context, componentInstance } = vnode
    if (!componentInstance._isMounted) {
      componentInstance._isMounted = true
      callHook(componentInstance, 'mounted')
    }
    if (vnode.data.keepAlive) {
      if (context._isMounted) {
        // vue-router#1212
        // During updates, a kept-alive component's child components may
        // change, so directly walking the tree here may call activated hooks
        // on incorrect children. Instead we push them into a queue which will
        // be processed after the whole patch process ended.
        queueActivatedComponent(componentInstance)
      } else {
        activateChildComponent(componentInstance, true /* direct */)
      }
    }
  },

Domain

Subdomains

Frequently Asked Questions

What does componentVNodeHooks.insert() do?
componentVNodeHooks.insert() is a function in the vue codebase.
What does componentVNodeHooks.insert() call?
componentVNodeHooks.insert() calls 3 function(s): activateChildComponent, callHook, queueActivatedComponent.

Analyze Your Own Codebase

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

Try Supermodel Free