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

React Native Launch: React Native Meetup

React Native Launch: React Native Meetup

We have a large React Native app in production and have developed patterns and approaches that have been fairly successful. Many of these are showcased in an open source sample project. How should you handle navigation? Is Flux any different in Native? What about testing? How do you share code across platforms? How easy is it to internationalize? In this talk, I’ll go through some implementations in the app and the decision criteria behind them.

Brian Leonard

April 06, 2016
Tweet

More Decks by Brian Leonard

Other Decks in Technology

Transcript

  1. Prototype •  10x faster (to develop) than iOS! but... • 

    Rou(ng? •  Flux? •  App structure? •  Tes(ng? •  Android?
  2. Rou(ng •  URL completely contains state •  Components can bootstrap

    •  Push no(fca(ons •  Reloading can skip ahead
  3. Data Storage •  Large Lists – Tasks (ac(ve and history) – Chat

    messages •  Singletons – User account / profile – Device – Environment
  4. App Structure •  Self-contained screens •  Shared components •  Shared

    mixins •  Flux PaWern •  Naviga(on •  PlaXorm-specific
  5. Test (mocha) Server (koa) Simulator (appium) Stub respsonses Give setup

    state Click on things Verify contents Runs Packager Ask for setup state Make API requests
  6. Android •  Just launched! •  87% shared code •  Not

    Shared – Environment Manager – Push No(fica(ons – Pickers: Date, Selec(on, Image – Ac(vity Indicator – Modals – Back BuWon
  7. To Summarize •  React is awesome •  React Na(ve is

    awesome x 2 •  Rethink mobile paWerns