Overview
Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn to implement event emitters in Swift TurboModules to enable native code to actively push updates to JavaScript instead of relying on polling mechanisms. Explore the complete process starting with defining event types in TypeScript specifications and using Codegen to generate native emit interfaces. Discover how to update Swift implementations to store and trigger callbacks when new keys are added, while understanding critical retain cycle issues that can occur between Swift closures and Objective-C. Master the techniques for safely resolving these memory management challenges and complete the implementation by subscribing to events using React useEffect hooks. Verify the end-to-end delivery system from native Swift code to the JavaScript layer, ensuring reliable communication between your native modules and React Native applications.
Syllabus
Adding Event Emitters to Your TurboModule in Swift
Taught by
Callstack Engineers