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

Adding React Native to an Existing App - Artsy ...

Adding React Native to an Existing App - Artsy x React Native 2018

How and why we choose to integrate React Native into our native app

http://artsy.github.io/artsy-x-react-native.html

Artsy Open Source

July 09, 2018
Tweet

More Decks by Artsy Open Source

Other Decks in Programming

Transcript

  1. • Ruby Developer since 2004 • Mac Developer since 2006

    • iOS Developer since 2009 Me! — Eloy Durán
  2. Eigen — Native iOS App Since 2012 1. Drop Screenshot

    Here 2. Resize to cover pink area
  3. Emission — React Native Views Since April 2016 1. Drop

    Screenshot Here 2. Resize to cover pink area
  4. • Simpler Mental Model • Simpler and more efficient networking

    • De-silo people • Improve developer experience • Expand platform support Why React Native — Summary
  5. class Artwork extends React.Component { handleTap() { SwitchBoard.presentNavigationViewController(this, this.props.artwork.href) }

    // ... } class SearchBar extends React.Component { handleTap() { Switchboard.presentModalViewController(this, "/search") } // ... } Mixed — How
  6. @implementation AREmissionSetup - (void)configureEmissionInstance:(AREmission *)emission; { emission.switchBoardModule.presentNavigationViewController = ^(UIViewController *

    _Nonnull fromViewController, NSString * _Nonnull route) { [fromViewController.navigationController pushViewController:[self viewControllerForRoute:route] animated:YES]; }; emission.switchBoardModule.presentModalViewController = ^(UIViewController * _Nonnull fromViewController, NSString * _Nonnull route) { UIViewController *viewController = [self viewControllerForRoute:route]; UINavigationController *navigationController = [self navigationControllerWithRootViewController:viewController]; [fromViewController.navigationController presentViewController:navigationController animated:YES completion:nil]; }; } // ... @end Mixed — How