React Native & Expo (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
New Architecture Deep Dive: JSI (JavaScript Interface), Fabric, and TurboModules.
senior LevelTypeScriptSystem Design
In Simple Words: The legacy React Native architecture relied on an asynchronous JSON bridge across three threads (JS, Native, Shadow), causing serialization lag during fast scrolling:
- JSI (JavaScript Interface): Replaces the JSON bridge with direct C++ host objects. JavaScript holds direct references to native C++/Java/Objective-C objects and invokes methods synchronously without string serialization.
- Fabric (New Renderer): Uses JSI to construct the C++ shadow tree directly, unifying rendering across platforms and supporting React 18 concurrent features.
- TurboModules: Native modules are loaded lazily on demand instead of initializing all native code at app launch, dramatically slashing cold startup times.