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
810
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
380
Learn Once, Write Anywhere - Intro to React Native (2)
aarongreenwald
0
110
Learn Once, Write Anywhere: Intro to React Native
aarongreenwald
4
920
Other Decks in Programming
See All in Programming
AHC045_解説
shun_pi
0
560
サービスレベルを管理してアジャイルを加速しよう!! / slm-accelerate-agility
tomoyakitaura
1
190
Road to RubyKaigi: Making Tinny Chiptunes with Ruby
makicamel
4
450
ウォンテッドリーの「ココロオドル」モバイル開発 / Wantedly's "kokoro odoru" mobile development
kubode
1
180
[NG India] Event-Based State Management with NgRx SignalStore
markostanimirovic
1
170
音声プラットフォームのアーキテクチャ変遷から学ぶ、クラウドネイティブなバッチ処理 (20250422_CNDS2025_Batch_Architecture)
thousanda
0
290
VitestのIn-Source Testingが便利
taro28
7
2.2k
Cursor/Devin全社導入の理想と現実
saitoryc
23
17k
Vibe Codingをせずに Clineを使っている
watany
17
6.3k
RuboCop: Modularity and AST Insights
koic
2
1.6k
七輪ライブラリー: Claude AI で作る Next.js アプリ
suneo3476
1
120
Compose Hot Reload is here, stop re-launching your apps! (Android Makers 2025)
zsmb
1
550
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
9
760
Building Applications with DynamoDB
mza
94
6.3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.3k
Faster Mobile Websites
deanohume
306
31k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
A better future with KSS
kneath
239
17k
Optimising Largest Contentful Paint
csswizardry
36
3.2k
The Cult of Friendly URLs
andyhume
78
6.3k
Code Reviewing Like a Champion
maltzj
522
40k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Language of Interfaces
destraynor
157
25k
Six Lessons from altMBA
skipperchong
27
3.7k
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]