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
Aaron Greenwald
September 13, 2016
Programming
1
850
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
Tweet
Share
More Decks by Aaron Greenwald
See All by Aaron Greenwald
Learn Once, Write Anywhere: Intro to React Native (3)
aarongreenwald
0
440
Learn Once, Write Anywhere - Intro to React Native (2)
aarongreenwald
0
120
Learn Once, Write Anywhere: Intro to React Native
aarongreenwald
4
970
Other Decks in Programming
See All in Programming
ThorVG Viewer In VS Code
nors
0
670
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
0
490
CSC307 Lecture 02
javiergs
PRO
1
760
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
110
AgentCoreとHuman in the Loop
har1101
4
130
Basic Architectures
denyspoltorak
0
200
Go コードベースの構成と AI コンテキスト定義
andpad
0
160
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
360
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
250
GISエンジニアから見たLINKSデータ
nokonoko1203
0
190
これならできる!個人開発のすゝめ
tinykitten
PRO
0
150
Grafana:建立系統全知視角的捷徑
blueswen
0
280
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Statistics for Hackers
jakevdp
799
230k
Balancing Empowerment & Direction
lara
5
840
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
130
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
120
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
98
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
41
Accessibility Awareness
sabderemane
0
35
End of SEO as We Know It (SMX Advanced Version)
ipullrank
2
3.9k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
360
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]