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
  598b2801_d8c2_3e04_0530_7ded414e83de["componentVNodeHooks.insert()"]
  82e2e746_8f28_fbf0_8cf7_69eca6423e4a["create-component.ts"]
  598b2801_d8c2_3e04_0530_7ded414e83de -->|defined in| 82e2e746_8f28_fbf0_8cf7_69eca6423e4a
  77ac8989_609a_4755_79eb_0403c1cc7788["callHook()"]
  598b2801_d8c2_3e04_0530_7ded414e83de -->|calls| 77ac8989_609a_4755_79eb_0403c1cc7788
  428cbd6d_51c5_fed9_65af_f319e424b217["activateChildComponent()"]
  598b2801_d8c2_3e04_0530_7ded414e83de -->|calls| 428cbd6d_51c5_fed9_65af_f319e424b217
  style 598b2801_d8c2_3e04_0530_7ded414e83de 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, defined in src/core/vdom/create-component.ts.
Where is componentVNodeHooks.insert() defined?
componentVNodeHooks.insert() is defined in src/core/vdom/create-component.ts at line 67.
What does componentVNodeHooks.insert() call?
componentVNodeHooks.insert() calls 2 function(s): activateChildComponent, callHook.

Analyze Your Own Codebase

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

Try Supermodel Free