useUnmount

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

Usage

import { useUnmount } from "@tealess/hooks";
export default function Component() {
useUnmount(() => {
// Cleanup logic here
});
return <div>Hello world</div>;
}