React — handle unmount event in useEffect hook
I need to have some clean up logic in the componentWillMount for the React life cycle, and I am wondering how can we do it through the react hook useEffect
, and I find a good reference in here.
I need to have some clean up logic in the componentWillMount for the React life cycle, and I am wondering how can we do it through the react hook useEffect
, and I find a good reference in here.
Fred Wong’s tech blog