Goals
• Brief introduction to React Native itself
• Short demo on running a React Native app and
the development loop
• Decide whether React Native would be a good
fit for your project
• Sensible blueprint for starting your own React
Native app
My experience thus far
• Viewer + organizer for
financial research articles
• Ca-Ching! iOS + Android
Getting up to speed
on React Native
No real prerequisites for getting started, but having
someone on the team who is familiar with Xcode
and/or android studio is a huge help
React Native is a framework that allows you to
build native applications with JavaScript and React
import React, { Component } from 'react';
import { Image, ScrollView, Text } from 'react-native';
class ScrollingImageWithText extends Component {
render() {
return (
<ScrollView>
<Image
source={{uri: 'https://i.chzbgr.com/full/7345954048/h7E2C65F9/'}}
style={{width: 320, height:180}}
/>
<Text>
On iOS, a React Native ScrollView uses a native UIScrollView.
On Android, it uses a native ScrollView.
</Text>
</ScrollView>
);
}
}
https://facebook.github.io/react-native/
Fast Development
• Quick development loop - refresh the app
immediately in most cases (no waiting for
compile)
• The majority of your app’s code will be reused
between Android and iOS
• Take advantage of large JavaScript package
ecosystem
Your team can get
up to speed quickly
• Much of the work can be done by folks with
little native development experience
• Framework is made of simple, easy to use
components
No lock-in
• You can use React Native as much or as little
as you’d like (maybe you just want to use it for
settings or form pages)
• If you have a major component in your app,
you can write it in native code
• If the team outgrows react native, it can be
phased out over time
Discord article -> https://blog.discordapp.com/why-discord-is-sticking-with-react-native-ccc34be0d427
Downsides
• Many different technologies being used
simultaneously
• The build process is more complicated
• Updates can be painful (both React Native and
ios/android updates)
• Android support is lagging a bit
Airbnb on Redux
“…Redux is notorious for its boilerplate and
has a relatively difficult learning curve. We
provided generators for some common
templates but it was still one of the most
challenging pieces and source of confusion
while working with React Native.”
https://medium.com/airbnb-engineering/react-native-at-airbnb-the-technology-
dafd0b43838
Sharing your App
Purpose Server Distributed via
Debug Local development Staging n/a
Internal
Internal / stakeholder
testing
Staging
Fabric Beta, hockey
app, etc
Beta/QA
Final approval / early
adopter testing
Production
Fabric Beta, hockey
app, etc
Release Release to public Production App Store
App Versions
App identifier -> com.tanookilabs.street-cuts.internal
react-native-device-info allows us to pull out the app
version from the app identifier:
import DeviceInfo from 'react-native-device-info'
export const isRelease = DeviceInfo.getBundleId().split('.').includes('release')
export const isBeta = DeviceInfo.getBundleId().split('.').includes('beta')
export const isInternal = DeviceInfo.getBundleId().split('.').includes('internal')
export const isDebug = DeviceInfo.getBundleId().split('.').includes('debug')
Use react-native-schemes-manager when creating non-
standard versions (e.g. internal/beta)
Continuous Integration
• Tests and linting are run for all pull requests
• Each push to master runs tests, linting, and builds iOS
and android internal version of the app
• Beta and release versions of the apps can be built on
demand
React Native is a game changer
for both developers and their
clients!
Further exploration
• Using CodePush to update production applications
without submitting through the app store processes
• Using TypeScript or Flow to avoid runtime errors