FlashcardIntermediate

useEffect Cleanup on Mobile

How useEffect's cleanup function prevents leaks when components unmount on mobile.

Question

In a React (Native) component, when does useEffect's cleanup function run, and why does it matter on mobile?

Click to reveal answer