The secrets of Shadow Tree and Unistyles 3.0
summary
Unistyles 3.0 moves styling into C++: a hybrid stylesheet (JSI + React Native Nitro) parses styles into C++ pointers with a 1,000‑line C++ parser, tracks up to 15 runtime dependencies, and performs selective shadow-tree updates to change style values without React re-renders. The demo shows surface-level rerender highlighting and switching teams causes no rerenders, with updates applied by mutating cloned shadow nodes via a transaction. It’s beta 8, Fabric/new architecture only, integrates with Reanimated, and can emit CSS for web.
AI-written summary · about
chapters (12)
- 0:00Introduction to Uni Styles
- 1:00Limitations of React Native styling
- 3:28Evolution of Uni Styles
- 4:53Converting to Uni Styles 3.0
- 7:02How Uni Styles works
- 13:18Shadow tree updates concept
- 15:50Linking styles to views
- 17:40Finding shadow nodes
- 19:46Accessing shadow tree registry
- 21:57Shadow tree commit process
- 22:41Demo of selective updates
- 23:54Q&A session begins
