- React
- Chain React
- 2017
- Breaking Down Bridging in React Native
Breaking Down Bridging in React Native
Peggy Rayzis at Chain React 2017
Crossing the bridge between native and JavaScript code can seem daunting, but it doesn’t have to be! This talk will simplify the process of bridging native modules & components by breaking down common patterns found in bridging implementations for iOS & Android. Whether you’re integrating a brownfield native application, an existing native component, or a third-party SDK into your React Native project, you will eventually have to cross the bridge between native code and JavaScript. This process can definitely be intimidating, especially if you’re coming from a JavaScript background. In my talk, I will demystify the bridging process by exposing common patterns and best practices for bridging native components and modules. To simplify bridging concepts, I will show you how to use react-native-create-bridge, a CLI that auto-generates native module & component templates in Obj-C, Swift, and Java. You’ll also learn how to communicate between native modules and JS code by properly utilizing eventDispatcher (iOS) and DeviceEventEmitter (Android). By the end of this talk, you’ll leave feeling confident enough in the fundamental concepts of bridging to build a native component or module and use it in your React Native app.