@ducor/hooks
Version:
A collection of useful React hooks for building modern web applications. Includes hooks for clipboard operations, window events, intervals, timeouts, and more.
9 lines (8 loc) • 310 B
TypeScript
import type { UnmountEffectCallback } from "@ducor/types";
/**
* `useUnmountEffect` runs the provided callback function when the component unmounts.
*
* @param fn - The function to execute on unmount.
*/
declare const useUnmountEffect: (fn: UnmountEffectCallback) => void;
export default useUnmountEffect;