Skip to content

Latest commit

 

History

History

unmount

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

🎒 @hooks/unmount

React hook execute a callback on component unmount

NPM version Travis License

Install

npm i @hooks/unmount

Usage

useUnmount

useUnmount(callback: () => void, hook: (effect: EffectCallback, deps?: DependencyList) => void = useEffect)

Parameters

callback: () => void

Function to execute.

hook: (effect: EffectCallback, deps?: DependencyList) => void = useEffect

Hook to use, defaults to useEffect.