Fabric: from JSX to pixels
Prerequisites: 01-three-layers
Fabric: from JSX to pixels — mechanism
Mental model verified
Fabric is the React Native renderer. It builds an immutable C++ shadow tree for host components, calculates layout, diffs the next tree, and mounts host views. Render and commit may be scheduled in several ways; the UI thread owns host view manipulation.
[S02] [S03] [S04]Worked example synthesis
Changing a card title creates affected React elements and shadow nodes, then commits layout and applies a host view update. The native control is not rebuilt from scratch for every React render.
[S03]Engineering choice synthesis
Use normal declarative props for view state. A native view is justified when a platform SDK owns a complex surface, such as a map or camera preview. Keep events and props small and well typed.
[S03] [S07]Pitfall and next step synthesis
Do not equate React render with immediate on-screen paint. Draw the render → commit → mount phases and inspect a slow frame for JS work, layout, or UI-thread mount cost.
[S02] [S03] [S12]Check yourself: What thread can actually change an Android View or iOS UIView?
The UI/main thread performs the host view mutation during mount.