Your question is React Native Component Lifecycle Deep Dive. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
You’re on a fintech mobile team shipping a React Native app with 5M+ monthly active users. A new “instant card controls” screen (freeze/unfreeze, spending limits) is causing intermittent bugs: duplicate network calls, stale UI after navigation, and occasional memory leaks from listeners.
These issues often come down to misunderstanding the lifecycle of a React Native component—especially how React schedules renders, when effects run, and how cleanup interacts with navigation and app backgrounding.
Walk me through the lifecycle of a React Native component from creation to destruction, and tie it to real behaviors:
useEffect and useLayoutEffect run? Where do subscriptions and initial fetches belong?