mirror of
https://github.com/streamich/react-use.git
synced 2025-12-08 18:02:14 +00:00
289 B
289 B
useUnmount
React lifecycle hook that call unmount callback, when
component is un-mounted.
Usage
import {useUnmount} from 'react-use';
const Demo = () => {
useUnmount(() => console.log('UNMOUNTED'));
return null;
};
Reference
useUnmount(mount);