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

Thorben Primke - Leavering Your Android Knowledge To Boost Your Team’s Velocity With React Native

Thorben Primke - Leavering Your Android Knowledge To Boost Your Team’s Velocity With React Native

droidcon Berlin

July 17, 2018
Tweet

More Decks by droidcon Berlin

Other Decks in Programming

Transcript

  1. Leavering Your Android Knowledge To Boost Your Team’s Velocity With

    
 React Native 6/27/2018 Thorben Primke Droidcon Berlin
  2. React Native React for building mobile application • Developed by

    Facebook • Uses JavaScriptCore for processing the JS • Renders natively • Extensible
  3. Our Interest What sparked the exploration • Product Engineering •

    Growth Engineering • Business value • Piece wise adoption
  4. Build Times Almost no more waiting • Android - 30sec

    to multiple minutes • RN - Instant reloads
  5. Context Less Lost In Translation • Efficient communication • One

    Engineer for Web & Mobile • PM, design and engineer • Fewer inconsistencies
  6. But really… …is there no other way • Server Driven

    UI • Hire more mobile engineers • Adds complexity to infrastructure
  7. The Team Thorben Primke
 
 Product Engineer @tprimke Vivian Qu


    
 Growth Engineer
 
 
 @vivqu
 Michael Schneider
 
 Core Experience Engineer
 
 @maicki
  8. New Home Where to keep the shared code • Android

    and iOS in separate repositories • Separate repository for RN • Symlink into mobile repositories
  9. Dependencies Frictionless integration • Leverage Maven • React Native is

    already in local maven • Every other library needs the same
  10. Dependencies Frictionless integration • Leverage Maven • React Native is

    already in local maven • Every other library needs the same
  11. Dependencies Frictionless integration • Leverage Maven • React Native is

    already in local maven • Every other library needs the same
  12. But APK Size …let’s take a look • Split APK

    by arch • Multi dex • Fresco already in codebase • Only armv7 and x86
  13. Let’s Render …how to render your React • Fragment based

    architecture • Full screen • One React screen / module, one fragment
  14. Let’s Render …how to render your React • Fragment based

    architecture • Full screen • One React screen / module, one fragment
  15. Dynamic Typing …but we like static languages • Flow •

    TypeScript • Typeahead & refactoring
  16. Native <-> RN …how does it work? • JavaScriptCore •

    React Native Bridge • Delayed initialization React Native Native Bridge
  17. API Client …no duplicate networking logic • Expose the REST

    methods • No auth token to pass around • Reuse logging
  18. API Client …no duplicate networking logic • Expose the REST

    methods • No auth token to pass around • Reuse logging
  19. UI Components …how does it work? • Pinterest Design System

    • Gestalt on web • Ported the majority to React Native
  20. Navigation Leave it to native • JS vs Native navigation

    • Single screen approach • Flexible router
  21. Navigation Leave it to native • JS vs Native navigation

    • Single screen approach • Flexible router
  22. Navigation Leave it to native • JS vs Native navigation

    • Single screen approach • Flexible router
  23. Localization Nothing out of the box • JS Libs •

    ICU format • Modeled after Android strings.xml
  24. Localization Nothing out of the box • JS Libs •

    ICU format • Modeled after Android strings.xml
  25. Localization Nothing out of the box • JS Libs •

    ICU format • Modeled after Android strings.xml
  26. Localization Nothing out of the box • JS Libs •

    ICU format • Modeled after Android strings.xml
  27. Ensuring Success …one screen at a time • A/A NUX

    performance experiment • Pre-build meetings • Always frictionless
  28. Ensuring Success …one screen at a time • 4+ screens

    live in the app • Continued support • Technology supported
  29. More Work …supporting non-fullscreen • Asynchronous JS layout • iOS

    has support RCTSurfaceView • Starting work for Android • Next version of React Native
  30. OTA Updates …or known as code push • Considered but

    delayed • Useful even with weekly releases • Requires UI to be fully JS