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

React Native

React Native

Presentation by João Anes

In this talk, we’re gonna talk mobile development without using strictly native tools - and yes, these sorts of platforms usually result in apps that don’t quite nail the native look&feel, residing in an uncanny valley for applications. However, this one’s a little different.

We’re talking about React Native, a mobile development framework, created, developed and endorsed by Facebook you can plug right in your existing native code to gain developer superpowers: Hot Reloading, instant deploys without an AppStore round-trip, UI expressed in React components and many more! Facebook says it’ll replace mobile development as we know it - so let’s see how true that might be!

Porto Codes

August 24, 2017
Tweet

More Decks by Porto Codes

Other Decks in Programming

Transcript

  1. BEST FEATURES 1. Multiplatform, 80-90% code share! 2. Faster iteration

    and development speed than native 3. Can be dropped in existant native apps 4. Write once, run anywhere, in JavaScript!
  2. EVALUATION CRITERIA 1. How is your code written/represented? 2. How

    is your code ran, and by what? 3. Who renders the user interface, and how?
  3. PHONEGAP (CORDOVA) 1. You write code in javascript, and you

    communicate with native modules through a bridge 2. Your JS code is interpreted by the device's JS Virtual Machine 3. Your views are written in HTML and rendered by the device's webview
  4. REACT NATIVE 1. You write code in javascript, communicating with

    native modules through a bridge 2. Your JS code is interpreted by a vendored JavascriptCore 3. Your views are written in React and rendered natively
  5. <div class="content"> <div class="profile"> <img src="/avatars/1337.jpg" /> <span class="info"> <i

    class="name">John Doe</i> <i class="title">CFO</i> </span> </div> <span class="contentTitle"> Titles! </span> ... </div>
  6. But react isn't just about extracting elements into modules. <ScrollableList>

    { profiles.map( profile => ( <Profile ...profile> )) } </ScrollableList>
  7. BEST FEATURES 1. Multiplatform, 80-90% code share! 2. Faster iteration

    and development speed than native 3. Can be dropped in existant native apps 4. JavaScript
  8. BEST FEATURES 1. Multiplatform, 80-90% code share! Metro-bundler is even

    con gured to load .ios.js and .android.js les!
  9. BEST FEATURES 1. Faster iteration and development speed than native

    Since your app is just a js bundle, you can beam that to your clients bypassing the stores!
  10. BEST FEATURES 1. Can be dropped in existant native apps

    You can integrate your existant native modules with the bridge.
  11. BEST FEATURES 1. JavaScript From ow to webpack, npm to

    Typescript, extensive tooling to make JS better exists.
  12. WORST FEATURES 1. Driven by Facebook needs Sometimes other companies

    and communities rise to the challenge. No router? * https://github.com/airbnb/native-navigation * https://github.com/wix/react-native-navigation * https://github.com/react-community/react-navigation
  13. WORST FEATURES 1. Long dependency chain That's a lot to

    break compared to native toolkits.
  14. CONTINUED FUTURE? Dogfooded and integrated into products at founding company

    Most code is open sourced, even if Facebook abandons Thousands of apps by different companies depend on them Microsoft maintains a Modern UI-frontend!