React useEffect Cleanup & Subscriptions

A cleanup function is used to remove resources when a component unmounts or before the effect runs again.