Fabric: three trees and three phases
Prerequisites: Start here / basic technical literacy
Representations and phases
State update and sharing
Mental model verified
Render reduces React elements to host components and creates an immutable C++ shadow tree. Commit calculates layout and promotes a next tree. Mount diffs against the rendered tree and applies host-view mutations on the UI thread.
[S05] [S06]Worked flow verified
A title changes from “Draft” to “Issued”. React updates affected elements; Fabric clones affected shadow nodes, shares unchanged nodes where possible, computes layout as needed and updates the host text view at mount.
[S05]Engineering decision synthesis
Profile render, layout and mount separately. A React rerender is not synonymous with recreating every native view.
[S05] [S07]Failure mode and improvement synthesis
Assuming “render completed” means “painted” leads to timing bugs. Use the appropriate layout and view APIs, then verify when the actual host view receives changes.
[S05] [S06]Check yourself: Is every React composite component also a native UIView or Android View?
No. Host components produce shadow nodes; composite components do not necessarily correspond to host views.