Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Cross-Platform React Native
Search
Connor McEwen
September 14, 2016
Technology
71
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Cross-Platform React Native
Connor McEwen
September 14, 2016
More Decks by Connor McEwen
See All by Connor McEwen
A Year With React Native
cmcewen
0
110
React Native Dev Tools
cmcewen
0
510
Other Decks in Technology
See All in Technology
クラウドを使う側から、作る側へ / 大吉祥寺.pm 2026前夜祭
fujiwara3
7
1.6k
セキュリティ研修【MIXI 26新卒技術研修】
mixi_engineers
PRO
12
13k
AIツールを導入しても生産性はあがらない? カオナビが直面した 3つの壁と乗り越え方。/ Overcoming 3 Barriers to AI-Driven Productivity at kaonavi
kaonavi
0
330
CloudWatchから始めるAWS監視
butadora
0
190
41歳でAWSが好きすぎてITエンジニアになったおっさんの話
yama3133
1
780
数値で見る Microsoft MVP 〜Spec Kit と GitHub Copilot Agent で作るデータ可視化ダッシュボード〜
yutakaosada
0
150
SRENEXT_2026_Chairs__Talks_in_Tamachi.sre.pdf
srenext
1
160
PHPで作って学ぶリアルタイム音声対話AIとWebSocket入門 by ムナカタ
munakata
0
170
変更し続けられるシステムをどう保つか — AI時代のSSoTという設計原則
kawauso
1
1.3k
AI驚き屋発見器
yama3133
1
350
AI工学特論: MLOps・継続的評価
asei
11
2.8k
AI時代におけるテストの基礎の再定義 / Rethinking the Fundamentals of Testing in the AI Era
mineo_matsuya
15
5.8k
Featured
See All Featured
Faster Mobile Websites
deanohume
310
32k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
270
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
380
Navigating Team Friction
lara
192
16k
RailsConf 2023
tenderlove
30
1.5k
Balancing Empowerment & Direction
lara
6
1.2k
We Are The Robots
honzajavorek
0
280
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
45k
Mind Mapping
helmedeiros
PRO
1
290
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
A better future with KSS
kneath
240
18k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Transcript
Cross-Platform React Native What does that really mean? Connor McEwen
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
RN Cross-Platform …We’re not chasing “write once, run anywhere.” We
call this approach “learn once, write anywhere.” iOS
How it works http://tadeuzagallo.com/blog/react-native-bridge/ iOS … Same API
How it works class Hello extends React.Component { render() {
return( <View> <Text>Hello world!</Text> </View> ) } } - (UIView *)view { return [RCTView new]; } @Override public ReactViewGroup createViewInstance(Them return new ReactViewGroup(context); }
The Dream
Reality
Why? • Design choices - material design • Phone features
- hardware back button • Different APIs - permissions • Performance • Layout
How • .ios.js + .android.js • inline Platform.OS class Hello
extends Component { render() { return( <View> <Text>I’m iOS!</Text> </View> ) } } class Hello extends Component { render() { return( <View> <Text>I’m Android!</Text> </View> ) } } class Hello extends Component { render() { if (Platform.OS === ‘ios’) { return( <View> <Text>I’m iOS!</Text> </View> ) } else { return( <View> <Text>I’m Android!</Text> </View> ) } } }
Our stats • 166 total files in js directory •
4 .android.js + 4.ios.js = 4.8% • 37 .js use the Platform API = 22% imageContainer: { paddingTop: Platform.OS === 'ios' ? 5 : 10 },
Timeline Started working on Flare on iOS Aug. 2015 RN
Android released Sep. 2015 Initial Flare Android version Mar. 2016 iOS release + feature May 2016 Oh shit Android bugs + perf June 2016 Android release June 2016 Google feedback to get featured July 2016 Android feature Aug 2016
Key differences • Material Design • Touchables • Permissions APIs
Lesson Learned • Test both platforms early • Don’t use
negative absolute positions • You might need to make native modules for parity • Things have gotten much better
Thanks! @connormcewen