tryOnUnmounted ​
Safe onUnmounted
. Call onUnmounted()
if it's inside a component lifecycle, if not, do nothing
Usage ​
js
import { tryOnUnmounted } from '@vueuse/core'
tryOnUnmounted(() => {
})
Type Declarations ​
typescript
/**
* 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 ​
Contributors ​
Anthony Fu
Anthony Fu
Doctorwu
qiang
Changelog ​
Pending for release...
59f75
- feat(toValue): deprecate toValue
from @vueuse/shared
in favor of Vue's nativev12.0.0-beta.1
on 11/21/2024v10.7.1
on 12/27/2023v10.7.0
on 12/5/2023