

Custom hook that runs a cleanup function when the component is unmounted.

## Usage [#usage]

```tsx
import { useUnmount } from "@tilt-legal/cubitt-components/utilities/hooks";

useUnmount(() => {
  // Cleanup logic here
});
```

## API [#api]

### Signature [#signature]

```ts
declare function useUnmount(func: () => void): void;
```

### Parameters [#parameters]

| Parameter | Type            | Description                                     | Default |
| --------- | --------------- | ----------------------------------------------- | ------- |
| `func`    | `() =&gt; void` | The cleanup function to be executed on unmount. | -       |

### Return Value [#return-value]

| Value    | Type   | Description                 |
| -------- | ------ | --------------------------- |
| `return` | `void` | Value returned by the hook. |
