Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
A Year With React Native
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Connor McEwen
November 02, 2016
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
A Year With React Native
Connor McEwen
November 02, 2016
Transcript
25 slides
Flare in Production A Year with React Native Connor McEwen
@connormcewen
About Me cmcewen @connormcewen Lead Engineer, Emerging Products Using React
Native since the beta
Flare • Small business community app • 100% React Native
• Featured in App Store + Google Play Store
Why RN? • React Component model for UI • OTA
Updates • JS everywhere • Cross-platform
The Cross Platform Dream
Reality
Platform Differences • Design choices - material design • Phone
features - hardware back button • Different APIs - permissions • Performance • Layout
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 },
Tips to my past self
Flow • Static type annotations • Catch errors at “compile”
time • Refactoring is much easier
Modern JS syntax • Use async/await, classes, etc. • This
+ flow help buy-in from native devs
Nuclide • IDE for RN • Flow + ESLint erros
CodePush • OTA Updates • OSS alternatives you can host
yourself
Redux/Redux-persist • State management • Logging much easier • Auto-sync/rehydrate
from disk
Node • Reduces mental overhead • Team is more multi-functional
• React for web apps is easier
Monorepo • New features usually require client + server side
change • Encourages everyone to review PRs
GraphQL • Client specifies the shape + data it needs
• Say goodbye to /api/v1 + /api/v2 • Especially helpful since mobile doesn’t guarantee updates
ESLint • Enforce a common style • Code maintainability
npm • Open source ecosystem is strong, but it’s a
double edged sword • Use npm shrinkwrap
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
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
New stuff • GraphQL clients: Apollo/Relay • Yarn • Exponent
• Native Animations
Stay informed • Release Notes • Reactiflux/Exponent Slack • RN
crew on Twitter
Overall • React Native was definitely the right choice for
us, and it’s only growing in popularity
Thanks! @connormcewen
[email protected]
More Decks by Connor McEwen
See All by Connor McEwen
Cross-Platform React Native
cmcewen
0
84
React Native Dev Tools
cmcewen
0
540
Featured
See All Featured
Bash Introduction
62gerente
615
220k
Being A Developer After 40
akosma
PRO
92
590k
Music & Morning Musume
bryan
48
7.5k
Writing Fast Ruby
sferik
630
63k
sira's awesome portfolio website redesign presentation
elsirapls
0
500
Crafting Experiences
bethany
1
430
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.6k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
Producing Creativity
orderedlist
PRO
348
41k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.7k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
400