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
430
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
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
1
490
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
200
これならできる!個人開発のすゝめ
tinykitten
PRO
0
140
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
210
Basic Architectures
denyspoltorak
0
160
Developing static sites with Ruby
okuramasafumi
1
340
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
150
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
160
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
180
Grafana:建立系統全知視角的捷徑
blueswen
0
270
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.4k
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
0
170
Featured
See All Featured
Between Models and Reality
mayunak
1
150
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
140
Ethics towards AI in product and experience design
skipperchong
1
150
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
720
Building an army of robots
kneath
306
46k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
97
The Cult of Friendly URLs
andyhume
79
6.7k
Making the Leap to Tech Lead
cromwellryan
135
9.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]