Avoid useEffect in React (video)
A nice video on how and why to avoid directly using useEffect in your react components
Why I Don’t Use useEffect In My React Components
useEffect is one of the greatest additions to React. It is so much nicer than using component lifecycle methods, but it comes with one huge problem. The API for useEffect sucks. Not only that, but having tons of useEffects in your components makes your code harder to parse and understand. This is why I try to minimize if not remove all useEffects from my components. This makes my code easier to read/write and makes sure all the ugliness of useEffect is hidden away in custom hooks.