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

Function onScopeDispose

src/apis/effectScope.ts:100–109  ·  view source on GitHub ↗
(fn: () => void)

Source from the content-addressed store, hash-verified

98}
99
100export function onScopeDispose(fn: () => void) {
101 if (activeEffectScope) {
102 activeEffectScope.cleanups.push(fn)
103 } else if (__DEV__) {
104 warn(
105 `onScopeDispose() is called when there is no active effect scope` +
106 ` to be associated with.`
107 )
108 }
109}
110
111/**
112 * @internal

Callers 2

setupFunction · 0.90

Calls 1

warnFunction · 0.90

Tested by 1

setupFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…