Communication Layer
React Native's communication layer enables JavaScript code to interact with native platform code:
- Legacy Bridge: Asynchronous, serialized JSON-based messaging system
- JavaScript Interface (JSI): Direct, synchronous communication between JavaScript and C++
- TurboModules: On-demand, type-safe native modules accessed through JSI
- CodeGen: Generates type-safe interfaces between JavaScript and native code
The EventEmitter is a core class that manages event handling throughout the system, allowing components to listen for and emit events.