# tryOnBeforeUnmount

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

**Package:** `@vueuse/shared`
**Category:** Component

## Usage

```ts
import { tryOnBeforeUnmount } from '@vueuse/core'

tryOnBeforeUnmount(() => {

})
```

## Reference

[VueUse Docs](https://vueuse.org/core/tryOnBeforeUnmount/)
