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
  f7b166da_430e_e05b_587f_4795e8e1a828["componentVNodeHooks.insert()"]
  71c7a5aa_6619_7aea_6a94_630a0527f309["callHook()"]
  f7b166da_430e_e05b_587f_4795e8e1a828 -->|calls| 71c7a5aa_6619_7aea_6a94_630a0527f309
  1d8baa0b_c777_dc3c_6dd6_bbb85b3734a1["queueActivatedComponent()"]
  f7b166da_430e_e05b_587f_4795e8e1a828 -->|calls| 1d8baa0b_c777_dc3c_6dd6_bbb85b3734a1
  3e7d2138_fd8b_c8fc_5bdd_a47787d28445["activateChildComponent()"]
  f7b166da_430e_e05b_587f_4795e8e1a828 -->|calls| 3e7d2138_fd8b_c8fc_5bdd_a47787d28445
  style f7b166da_430e_e05b_587f_4795e8e1a828 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