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.
useEffect