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

A Year With React Native

Connor McEwen
November 02, 2016
110

A Year With React Native

Connor McEwen

November 02, 2016
Tweet

Transcript

  1. Flare • Small business community app • 100% React Native

    • Featured in App Store + Google Play Store
  2. Why RN? • React Component model for UI • OTA

    Updates • JS everywhere • Cross-platform
  3. Platform Differences • Design choices - material design • Phone

    features - hardware back button • Different APIs - permissions • Performance • Layout
  4. Our stats • ~30k LOC in project (client + server)

    • 169 total files in client directory • 4 .android.js + 4.ios.js = 4.7% • 41 .js use the Platform API = 24% imageContainer: { paddingTop: Platform.OS === 'ios' ? 5 : 10 },
  5. Monorepo • New features usually require client + server side

    change • Encourages everyone to review PRs
  6. GraphQL • Client specifies the shape + data it needs

    • Say goodbye to /api/v1 + /api/v2 • Especially helpful since mobile doesn’t guarantee updates
  7. npm • Open source ecosystem is strong, but it’s a

    double edged sword • Use npm shrinkwrap
  8. React Native Versions • Stay a release or two behind

    bleeding edge for stability • Forking may be necessary for specific features or bugfixes, but try to avoid it • Forking on iOS/making JS changes is much easier than Android
  9. Team • Team should be fullstack - features, not layers

    • You probably still need 1 iOS and 1 Android expert • Get involved in the open source community
  10. Overall • React Native was definitely the right choice for

    us, and it’s only growing in popularity