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
React Native Code Reuse: Architecture that Works
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Aaron Greenwald
September 13, 2016
Programming
890
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React Native Code Reuse: Architecture that Works
Talk from React Native Tel Aviv (RN_TLV) meetup on the Wix roof, 2016/09/13
Aaron Greenwald
September 13, 2016
More Decks by Aaron Greenwald
See All by Aaron Greenwald
Learn Once, Write Anywhere: Intro to React Native (3)
aarongreenwald
0
470
Learn Once, Write Anywhere - Intro to React Native (2)
aarongreenwald
0
140
Learn Once, Write Anywhere: Intro to React Native
aarongreenwald
4
1k
Other Decks in Programming
See All in Programming
Deep dive into the select statement (GopherCon UK)
jespino
0
170
Laravelのアプリケーションをどこにデプロイするか #ツナギメオフライン.9
akase244
0
120
「AI時代、配布するPythonコードをどう守るか: 難読化の実験と判断軸」 #PyconJP2026
pkshadeck
PRO
2
160
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
120
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
3
1k
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
型解析で実現する Go の言語内 DSL / Conference に Go! タイムテーブルの歩き方 for Gophers
mazrean
0
130
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
170
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
420
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
120
20260828_品質と開発生産性を両立させる、AI時代のE2Eテストの考え方
magicpod
0
150
Featured
See All Featured
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
520
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Tell your own story through comics
letsgokoyo
1
1.1k
Fireside Chat
paigeccino
42
4k
Claude Code のすすめ
schroneko
67
230k
Marketing to machines
jonoalderson
1
5.7k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
WCS-LA-2024
lcolladotor
0
820
Transcript
Architecture that Works React Native Code Reuse Aaron Greenwald github.com/aarongreenwald
@aaronjgreenwald
[email protected]
01 / The Promise
“...that approach yielded around 85% reuse of app code” -
Facebook
“...that approach yielded around 85% reuse of app code” -
Facebook “Don’t repeat yourself. It’s not only repetitive, it’s redundant, and people have heard it before.” - Lemony Snicket
Is it true?
Yes!
(Mostly)
Android & iOS
Web Apps Android & iOS
Web Apps Other RN Projects Android & iOS
02 / Android & iOS
Platform-Specific Code Platform Module Conditional statements in code
Platform-Specific Code Filename Suffixes Separate files per platform
Composition > Inheritance
Platform-Specific Code Platform Module Conditional statements in code Filename Suffixes
Separate files per platform
Architecture Matters
Keep logic out of views
Presenters/Dispatchers Keep logic out of views
Presenters/Dispatchers Logic should be cross-platform Keep logic out of views
Presenters/Dispatchers Logic should be cross-platform Keep logic out of views
Small & modular views
03 / Web Apps
Architecture Matters
Reusable application logic
Compilation gets complicated Reusable application logic
Create a separate module Compilation gets complicated Reusable application logic
Create a separate module Compilation gets complicated Reusable application logic
npm link...
04 / Multiple Projects
Architecture Matters
Binaries
Dependency Hell Binaries
Is it worthwhile? Dependency Hell Binaries
Architecture Matters
#architecture_matters github.com/aarongreenwald @aaronjgreenwald
[email protected]