React Native JavaScript اور native code چلاتا ہے جنہیں ایک دوسرے سے communicate کرنا ہوتا ہے۔ اصل architecture ایک asynchronous bridge استعمال کرتی تھی؛ نئی architecture (JSI، TurboModules، Fabric) تیز رفتار، synchronous communication کو فعال بناتی ہے۔ یہ سمجھنا React Native کے رویے اور کارکردگی کو واضح کرتا ہے۔
اصل architecture: bridge
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
