Home / Function/ setCurrentInstance() — vue Function Reference

setCurrentInstance() — vue Function Reference

Architecture documentation for the setCurrentInstance() function in currentInstance.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  f6cc67da_03fd_cbe1_8ffb_6aaf0358d6ae["setCurrentInstance()"]
  71c7a5aa_6619_7aea_6a94_630a0527f309["callHook()"]
  71c7a5aa_6619_7aea_6a94_630a0527f309 -->|calls| f6cc67da_03fd_cbe1_8ffb_6aaf0358d6ae
  70955a0b_0285_0cc3_de2f_6b5cc0bcd0dd["renderMixin()"]
  70955a0b_0285_0cc3_de2f_6b5cc0bcd0dd -->|calls| f6cc67da_03fd_cbe1_8ffb_6aaf0358d6ae
  c7f1d55d_2699_9c30_8e7e_777b218e0242["normalizeScopedSlot()"]
  c7f1d55d_2699_9c30_8e7e_777b218e0242 -->|calls| f6cc67da_03fd_cbe1_8ffb_6aaf0358d6ae
  87ac0b39_9319_5c07_1390_906641a5c4fe["initSetup()"]
  87ac0b39_9319_5c07_1390_906641a5c4fe -->|calls| f6cc67da_03fd_cbe1_8ffb_6aaf0358d6ae
  style f6cc67da_03fd_cbe1_8ffb_6aaf0358d6ae fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/v3/currentInstance.ts lines 19–23

export function setCurrentInstance(vm: Component | null = null) {
  if (!vm) currentInstance && currentInstance._scope.off()
  currentInstance = vm
  vm && vm._scope.on()
}

Domain

Subdomains

Frequently Asked Questions

What does setCurrentInstance() do?
setCurrentInstance() is a function in the vue codebase.
What calls setCurrentInstance()?
setCurrentInstance() is called by 4 function(s): callHook, initSetup, normalizeScopedSlot, renderMixin.

Analyze Your Own Codebase

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

Try Supermodel Free