MCPcopy
hub / github.com/vuejs/composition-api / setCurrentInstance

Function setCurrentInstance

src/runtimeContext.ts:104–110  ·  view source on GitHub ↗
(instance: ComponentInternalInstance | null)

Source from the content-addressed store, hash-verified

102}
103
104export function setCurrentInstance(instance: ComponentInternalInstance | null) {
105 if (!currentInstanceTracking) return
106 const prev = currentInstance
107 prev?.scope.off()
108 currentInstance = instance
109 currentInstance?.scope.on()
110}
111
112export type Slot = (...args: any[]) => VNode[]
113

Callers 3

activateCurrentInstanceFunction · 0.90
wrapHookCallFunction · 0.90
setCurrentVue2InstanceFunction · 0.85

Calls 2

offMethod · 0.80
onMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…