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
  387f4cc0_d1d8_687f_b954_207658b1a562["setCurrentInstance()"]
  a7fb5d54_f5e0_5d73_5f6a_96e6c47acbeb["callHook()"]
  a7fb5d54_f5e0_5d73_5f6a_96e6c47acbeb -->|calls| 387f4cc0_d1d8_687f_b954_207658b1a562
  0c80f6b1_99f1_9c51_75ee_9bd37a1ef857["renderMixin()"]
  0c80f6b1_99f1_9c51_75ee_9bd37a1ef857 -->|calls| 387f4cc0_d1d8_687f_b954_207658b1a562
  4654ec48_ee34_3880_324a_14ac626facd2["normalizeScopedSlot()"]
  4654ec48_ee34_3880_324a_14ac626facd2 -->|calls| 387f4cc0_d1d8_687f_b954_207658b1a562
  0172bfc6_ac03_78a5_d338_b37f7a86af7a["initSetup()"]
  0172bfc6_ac03_78a5_d338_b37f7a86af7a -->|calls| 387f4cc0_d1d8_687f_b954_207658b1a562
  style 387f4cc0_d1d8_687f_b954_207658b1a562 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