react-use/docs/useUnmount.md
2018-10-27 23:39:33 +02:00

24 lines
289 B
Markdown

# `useUnmount`
React lifecycle hook that call `unmount` callback, when
component is un-mounted.
## Usage
```jsx
import {useUnmount} from 'react-use';
const Demo = () => {
useUnmount(() => console.log('UNMOUNTED'));
return null;
};
```
## Reference
```js
useUnmount(mount);
```