Skip to content

tryOnUnmounted

Category
Export Size
144 B
Last Changed
4 days ago

Safe onUnmounted. Call onUnmounted() if it's inside a component lifecycle, if not, do nothing

Usage

ts
import { 
tryOnUnmounted
} from '@vueuse/core'
tryOnUnmounted
(() => {
})

Type Declarations

ts
/**
 * Call onUnmounted() if it's inside a component lifecycle, if not, do nothing
 *
 * @param fn
 * @param target
 */
export declare function 
tryOnUnmounted
(
fn
:
Fn
,
target
?: any): void

Source

SourceDocs

Contributors

NoiseFan

Changelog

No recent changes

Released under the MIT License.