useWillUnmount
API
import useWillUnmount from '@restart/hooks/useWillUnmount'
useWillUnmount
(fn: () => void) => voidAttach a callback that fires when a component unmounts
Parameters
fn
() => voidHandler to run when the component unmounts
Return Value void