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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
130
Learn Once, Write Anywhere: Intro to React Native
aarongreenwald
4
970
Other Decks in Programming
See All in Programming
ふん…おもしれぇ Parser。RubyKaigi 行ってやるぜ
aki_pin0
0
110
AI巻き込み型コードレビューのススメ
nealle
2
2.2k
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
PRO
0
180
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
140
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
240
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
330
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
2
170
AI時代の認知負荷との向き合い方
optfit
0
180
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
180
Raku Raku Notion 20260128
hareyakayuruyaka
0
410
今から始めるClaude Code超入門
448jp
8
9.4k
Metaprogramming isn't real, it can't hurt you
okuramasafumi
0
120
Featured
See All Featured
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
220
The Pragmatic Product Professional
lauravandoore
37
7.2k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
110
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.1k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.1k
Accessibility Awareness
sabderemane
0
68
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Why Our Code Smells
bkeepers
PRO
340
58k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
59
50k
Making Projects Easy
brettharned
120
6.6k
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]