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
870
1
Share
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
450
Learn Once, Write Anywhere - Intro to React Native (2)
aarongreenwald
0
130
Learn Once, Write Anywhere: Intro to React Native
aarongreenwald
4
990
Other Decks in Programming
See All in Programming
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
220
The free-lunch guide to idea circularity
hollycummins
0
420
AI活用のコスパを最大化する方法
ochtum
0
370
へんな働き方
yusukebe
6
2.9k
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
970
20260315 AWSなんもわからん🥲
chiilog
2
190
PHPで TLSのプロトコルを実装してみる
higaki_program
0
740
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
160
Swift Concurrency Type System
inamiy
0
110
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
250
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
180
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
320
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
160
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
53k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
250
How to Ace a Technical Interview
jacobian
281
24k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
260
Bash Introduction
62gerente
615
210k
My Coaching Mixtape
mlcsv
0
94
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
A designer walks into a library…
pauljervisheath
211
24k
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]