Nice of you to share your understanding of the useEffect hook kpeale 🎉, it was a good read. Though there are some things I'd say weren't clear, like the cleanup function.
Essentially the cleanup function runs when a component unmounts, that is when you leave that component to maybe view another component.
Keep up the good work though, and keep sharing your thought, in no time you'd be a guru at React 🤩