How React Native runs your app · senior
Fabric: render, commit and mount
On Fabric, a React update goes through render (React elements become an immutable C++ shadow tree, usually on the JS thread), commit (Yoga computes layout and the new tree is promoted, often on a background thread) and mount (the trees are diffed and only the changed native views are created or updated, on the UI thread).
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Only host components (View, Text, Image and so on) get shadow nodes. Your own components never reach native.
- Render: React reconciles and creates or clones shadow nodes in C++. Commit: Yoga layout runs and the new tree becomes the "next" tree. Mount: a diff produces create / update / delete operations that run on the UI thread.
- The shadow tree is immutable. An update clones only the changed nodes and their parents (structural sharing), so different threads can read it safely.
- View flattening removes "layout-only" Views during diffing. The docs cite production trees of about 600–1000 nodes becoming about 200 native views.
- Discrete high-priority events (like a tap) can run the whole pipeline synchronously on the UI thread. Some C++ state updates (ScrollView offset) skip the render phase.
- Because Fabric can read layout synchronously, useLayoutEffect can measure a view and fix a tooltip's position before the user sees it: no one-frame flicker.
- Since 0.82, refs return DOM-like nodes (getBoundingClientRect, parentNode, children). Since 0.88, events use the W3C EventTarget model with real capture and bubble phases.
The red pen
Common traps: mistake → fix
Mistake: "React Native diffs a virtual DOM in a browser"
Fix: there is no browser; host trees are diffed in C++.
Mistake: "Layout is calculated in JavaScript"
Fix: Yoga is C++ and runs in the commit phase.
Mistake: "Any thread can update native views"
Fix: only the UI thread mounts host views.
Mistake: "onLayout + measure is the only way to place a tooltip"
Fix: on Fabric, useLayoutEffect can read layout synchronously in the same commit.
Easy to hard
Questions interviewers ask, easy to hard
- Walk me through setState to pixels on the New Architecture. Which thread runs each phase?
- What is a shadow node, and which components get one?
- What is view flattening and why does it matter?
- Why does an immutable shadow tree matter for threads?
- How do you show a tooltip under a button with no flicker today?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.