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
840
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
960
Other Decks in Programming
See All in Programming
スタートアップを支える技術戦略と組織づくり
pospome
8
9.7k
Micro Frontendsで築いた 共通基盤と運用の試行錯誤 / Building a Shared Platform with Micro Frontends: Operational Learnings
kyntk
0
110
CSC509 Lecture 11
javiergs
PRO
0
310
Developing Specifications - Jakarta EE: a Real World Example
ivargrimstad
0
160
How Software Deployment tools have changed in the past 20 years
geshan
0
1.1k
例外処理を理解して、設計段階からエラーを見つけやすく、起こりにくく #phpconfuk
kajitack
12
6.3k
Querying Design System デザインシステムの意思決定を支える構造検索
ikumatadokoro
1
1.2k
Stay Hacker 〜九州で生まれ、Perlに出会い、コミュニティで育つ〜
pyama86
2
2.4k
最新のDirectX12で使えるレイトレ周りの機能追加について
projectasura
0
290
AIの弱点、やっぱりプログラミングは人間が(も)勉強しよう / YAPC AI and Programming
kishida
10
5.2k
CloudNative Days Winter 2025: 一週間で作る低レイヤコンテナランタイム
ternbusty
7
1.7k
[堅牢.py #1] テストを書かない研究者に送る、最初にテストを書く実験コード入門 / Let's start your ML project by writing tests
shunk031
11
5.4k
Featured
See All Featured
Context Engineering - Making Every Token Count
addyosmani
9
410
Navigating Team Friction
lara
190
16k
Become a Pro
speakerdeck
PRO
29
5.6k
How to Ace a Technical Interview
jacobian
280
24k
How to Think Like a Performance Engineer
csswizardry
28
2.3k
GitHub's CSS Performance
jonrohan
1032
470k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
118
20k
Building Adaptive Systems
keathley
44
2.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Designing for humans not robots
tammielis
254
26k
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]