UNPKG

@supunlakmal/hooks

Version:

A collection of reusable React hooks

8 lines (7 loc) 276 B
/** * Custom hook that runs a callback function when the component unmounts. * Ensures the callback is only called once during the unmount phase. * * @param onUnmount - The function to call on unmount. */ export declare const useUnmount: (onUnmount: () => void) => void;