one-hook
Size
0.20 kb
View source

useUnmountEffect

Execute the callback when the component unmounts (cleanup effect).

Installation

npm install @1hook/use-unmount-effect

Usage

import {  } from '@1hook/use-unmount-effect'

Execute a function on unmount:

(() => .('Unmounted!'))

On this page