How to use `componentWillUnmount()` with `useEffect()`?
useEffect(() => {
return () => {
console.log('unmount')
}
}, [])
September 9th, 2019
The returned function inside useEffect()
will be called before the component is removed from the UI.