React Native kører JavaScript og native kode, som skal kommunikere med hinanden. Den oprindelige arkitektur brugte en asynkron bridge; den nye arkitektur (JSI, TurboModules, Fabric) muliggør hurtigere, synkron kommunikation. At forstå dette præciserer React Natives opførsel og ydeevne.
Den oprindelige arkitektur: bridge'en
React Native runs:
→ a JS THREAD (your React/JS code) and the NATIVE side (UI, native modules)
→ they communicate over a BRIDGE: messages are SERIALIZED (to JSON), passed ASYNC,
and deserialized on the other side
Limitations:
✗ ASYNCHRONOUS only (can't call native synchronously)
✗ SERIALIZATION overhead; the bridge can be a BOTTLENECK with heavy traffic
✗ e.g. fast scrolling/animations passing data over the bridge → jank
