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
860
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
450
Learn Once, Write Anywhere - Intro to React Native (2)
aarongreenwald
0
130
Learn Once, Write Anywhere: Intro to React Native
aarongreenwald
4
980
Other Decks in Programming
See All in Programming
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
160
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
120
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
110
OTP を自動で入力する裏技
megabitsenmzq
0
120
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
140
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
3
1.1k
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.1k
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
280
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
AI活用のコスパを最大化する方法
ochtum
0
250
Understanding Apache Lucene - More than just full-text search
spinscale
0
130
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.3k
Featured
See All Featured
Building AI with AI
inesmontani
PRO
1
800
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.7k
How to build a perfect <img>
jonoalderson
1
5.3k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
320
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
110
Agile that works and the tools we love
rasmusluckow
331
21k
Documentation Writing (for coders)
carmenintech
77
5.3k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
240
New Earth Scene 8
popppiees
1
1.7k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
160
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
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]