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
Cross-Platform React Native
Search
Connor McEwen
September 14, 2016
Technology
84
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
120
React Native Dev Tools
cmcewen
0
530
Other Decks in Technology
See All in Technology
生成AI時代のIAMのマニアックな話
takuros
6
2.7k
BALLAS Technology Deck
ballas_inc
0
160
攻撃 3 時間 vs 復旧 10 時間。アクセスキー流出の非対称性を体感するために CTF を作った話
kazzpapa3
1
150
試験勉強はGrokBotでやれ
maigo999
0
110
re:Invent の去年のスケジュールを公開します!
miu_crescent
PRO
0
320
Technical Project Manager の役割とやりがい、少しだけ AI
yoshiiryo1
0
600
AWSを利用する上で知っておきたい名前解決の話 2026
nagisa53
5
3.2k
推論基盤と Scale-Up Interconnect の現状と制約から俯瞰する技術動向
markunet
2
840
並列度を下げたら速くなった — go build の重複コンパイルを実測で見る
tomoaki25
1
740
登壇はいいぞ! 〜Kaigi on Railsに登壇して起きた3つの変化〜
occhi
0
110
Lint の層を組み直した話
bengo4com
3
320
AI時代の組織作り:チーム開発から「個人×AI」への移行と、持続可能な「開発資本」の築き方
ham0215
2
300
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k
The Cost Of JavaScript in 2023
addyosmani
56
10k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Practical Orchestrator
shlominoach
192
12k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
420
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.5k
How Software Deployment tools have changed in the past 20 years
geshan
3
35k
The Limits of Empathy - UXLibs8
cassininazir
2
770
Become a Pro
speakerdeck
PRO
31
6.4k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
580
Ruling the World: When Life Gets Gamed
codingconduct
0
430
How to Think Like a Performance Engineer
csswizardry
28
2.9k
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