
Oh fuck you React! You told us that useEffect with an empty array of dependencies is the new way of modelling the componentDidMount lifecycle hook; you told us that the cleanup function from useEffect is the new way of modelling the componentWillUnmount lifecycle hook; and now you are telling us to stop treating an empty array as a semantic guarantee? How do we do stuff we want to do just once on mounting/unmounting components then?
(source)