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

Intro to React Native

Intro to React Native

Picnic Code workshop about React Native (https://www.gui.uva.es/taller-introduccion-a-react-native/)

Demo and guide available in https://github.com/patoroco/react-native-workshop

Jorge Maroto

May 20, 2016
Tweet

More Decks by Jorge Maroto

Other Decks in Programming

Transcript

  1. ‣ From 2012 ‣ QR-Scanner for iOS & Android ‣

    Several entrances to the same venue ‣ Recurrent events vs. big festivals ‣ Bad lighting conditions ‣ Battery issues Checkpoint :: Product 5
  2. ‣ Obj-C / Java ‣ iOS 6 / Android 1.5

    ‣ Core Data / SQLite ‣ ZXing / ZBar ‣ Captuvo SDK Checkpoint :: Tech 6
  3. ‣ From 2013 ‣ Ad-hoc installations ‣ Numbered and not

    numbered venues ‣ Printers Box Office :: Product 8
  4. ‣ Geolocated events ‣ Push notifications ‣ Bridging with some

    parts in current frontend Purchase app :: Product 10
  5. ‣ Framework by facebook ‣ Using React ‣ Easy bridging

    native code ‣ Multiplatform apps written in JavaScript (actually ES2015) What is React Native? 13
  6. ‣ Not a webview ‣ Not a 100% code reuse

    ‣ Closer to frontend development than native development What is not React Native? 14
  7. ‣ It's a pattern supported by a library ‣ Different

    implementations: ReactJS / React Native ‣ Everything in React is a component ‣ Data flow is unidirectional What is React? 15
  8. ‣ React always re-renders ‣ Every component has two important

    things ‣ state ‣ properties (props) Virtual DOM 18
  9. ‣ Support for iOS / Android index.ios.js / index.android.js ‣

    ToastAndroid / ActivityIndicatorIOS Differences iOS <—> Android 21
  10. ‣ There is a great getting started tutorial from facebook

    ‣ Better on OS X ‣ XCode > 7.0 / Android 6.0 (API 23) ‣ node 4.0 + watchman + flow npm install -g react-native-cli react-native init <project_name> Getting started 23
  11. Next chapters… 33 ‣ React Native Playgrounds (https://rnplay.org/) ‣ rnpm

    (React Native Package Manager) ‣ Redux ‣ Reactotron ‣ Hybrid apps (old native app + parts in React Native) ‣ RealmJS ‣ Testing ‣ Microsoft Code Push ‣ …
  12. Issues 35 ‣ Blocking animations ‣ Some inconsistencies between iOS

    / Android ‣ We’ve hit around 12 bugs and reported some ‣ Early adopting on Android
  13. Advantages 36 ‣ Sharing code between platforms (including tests) ‣

    Testing in JS-way (no simulator needed) ‣ Web developers can easily jump into react-native ‣ Some things are done faster (less boilerplate) ‣ React and redux are a killer combo ‣ Learning curve ‣ Introduce new people to the project
  14. Disadvantages 37 ‣ Missing more best practices ‣ Storyboards vs.

    (JSX + flexbox) ‣ (Swift / Obj-C / Java / Kotlin) vs. JS ‣ Mature ecosystem with less WTF/min ‣ More libraries available