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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
新人はどこまで自力でやり、どこからAIに頼るべきか/エンジニア育成に向き合う_先輩たちの悩みと知見共有会
toppan_digital_dev
1
500
私のClaude Code活用法 (個人開発編) - PHPerKaigi mini #4(2026/08/24)
panda_program
1
200
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
4
2.5k
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
110
自分的「カンファレンスの楽しみ方」
syumai
0
180
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
이 함수, 실패하면 어떻게 되나요? null부터 Rich Errors까지, Kotlin 에러 처리 15년
haeti2
0
110
How I Won Prize Money at a Hackathon Using Codex and Symphony Alpha
yasei_no_otoko
0
140
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
520
ソフトウェアエンジニアにとっての生成AI - 特性を知って使い倒す / generative ai for software enginner
kishida
7
2.3k
ソフトウェアラスタライザ
fadis
1
770
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
800
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
187
23k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.5k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
480
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
Discover your Explorer Soul
emna__ayadi
2
1.3k
Agile that works and the tools we love
rasmusluckow
331
22k
Writing Fast Ruby
sferik
630
63k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
Google's AI Overviews - The New Search
badams
0
1.6k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
65k
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]