On this page
tryOnScopeDispose
Category | Component |
---|---|
Export Size | 100 B |
Last Changed | 3 months ago |
Safe onScopeDispose
. Call onScopeDispose()
if it's inside an effect scope lifecycle, if not, do nothing
Usage
import { tryOnScopeDispose } from '@vueuse/core'
tryOnScopeDispose(() => {
})
Type Declarations
/**
* Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
*
* @param fn
*/
export declare function tryOnScopeDispose(fn: Fn): boolean
Source
No recent changes© 2019-present Anthony Fu
Licensed under the MIT License.
https://vueuse.org/shared/tryOnScopeDispose/