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
  4accbb05_fb35_7066_14cf_218d3f576a8a["componentVNodeHooks.insert()"]
  a6875054_df8a_0ce4_8a16_374ce422dc53["create-component.ts"]
  4accbb05_fb35_7066_14cf_218d3f576a8a -->|defined in| a6875054_df8a_0ce4_8a16_374ce422dc53
  f8064a1e_1b6a_274a_f334_111faf594604["callHook()"]
  4accbb05_fb35_7066_14cf_218d3f576a8a -->|calls| f8064a1e_1b6a_274a_f334_111faf594604
  c839785a_cc49_21a8_563d_d8789c68747b["activateChildComponent()"]
  4accbb05_fb35_7066_14cf_218d3f576a8a -->|calls| c839785a_cc49_21a8_563d_d8789c68747b
  style 4accbb05_fb35_7066_14cf_218d3f576a8a 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