Use effect has too many foot guns that are done better by libraries like react query. You can get away with never using use effect by using some of these services to do yourapi fetches in a more kind of normalized way, where everyone's doing it the exact same way. I think you're also fine to use reat query. There's no need each with their own dependency array. None of these concepts apply to mount et cetera. Code is idea ideam potent. Is there an easy way to make sure use effect runs automatically twice on development mode? If so, i'll save you guys 26 minutes of your life and talk about it next time. The show notes:

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode