Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 289 Bytes

useUnmount.md

File metadata and controls

23 lines (15 loc) · 289 Bytes

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);