Side effects (e.g., data fetching) are managed using the useEffect hook, where clean-up functions are added to avoid memory leaks.
useEffect