rooks
Version:
Collection of awesome react hooks
11 lines (10 loc) • 325 B
TypeScript
type Callback = () => void;
/**
* useWillUnmount hook
* Fires a callback just before component unmounts
*
* @param {Function} callback Callback to be called before unmount
* @see https://rooks.vercel.app/docs/hooks/useWillUnmount
*/
declare function useWillUnmount(callback: Callback): void;
export { useWillUnmount };