Attempts to register a disposal callback on the current active effect scope.
The callback to invoke when the effect scope is disposed.
true if the callback was registered, false otherwise.
true
false
tryOnScopeDispose(() => { console.log('Effect scope disposed') }) Copy
tryOnScopeDispose(() => { console.log('Effect scope disposed') })
Attempts to register a disposal callback on the current active effect scope.