Upgrade to Pro — share decks privately, control downloads, hide ads and more …

React Native Fundamentals for Brownfield iOS Apps

React Native Fundamentals for Brownfield iOS Apps

(Presented at React Native London March Meetup)

In this talk, Karan will share his learnings from working on the React Native infrastructure at Skyscanner. These are concepts and use-cases that a developer would encounter in their journey of integrating React Native in a brownfield app. Knowing these ahead of time would help folks take the right decisions when building their own React Native infrastructure.

Original Keynote presentation link: http://bit.ly/rn-ldn-mar-keynote

Karan Thakkar

March 20, 2019
Tweet

More Decks by Karan Thakkar

Other Decks in Technology

Transcript

  1. What are we going to cover? Showing a React Native

    screen Navigation Reusing React Native components in Native
  2. Showing a React Native screen View Controller View UIViewController *vc

    = [UIViewController new]; vc.view = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:moduleName initialProperties:initialProperties launchOptions:nil];
  3. View Controller UIViewController *vc = [UIViewController new]; Showing a React

    Native screen vc.view = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:moduleName initialProperties:initialProperties launchOptions:nil]; Initialising the bridge (RCTBridge) Creating the React Native View
 (RCTRootView) Just in time Ahead of time
  4. Initialising the bridge Creating the React Native View [[RCTRootView alloc]

    initWithBridge:bridge moduleName:moduleName initialProperties:initialProperties];
  5. Figure out how navigation works in your app Create a

    bridge module that expose methods So how do you solve them? Opening a screen Closing a screen
  6. View Controller View UIViewController *vc = [UIViewController new]; RCTRootView *rootView

    = [[RCTRootView alloc] initWithBridge:bridge moduleName:@“Widget” initialProperties:nil]; [vc.view addSubview:rootView]; Reusing React Native components in Native