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
730
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
320
Learn Once, Write Anywhere - Intro to React Native (2)
aarongreenwald
0
91
Learn Once, Write Anywhere: Intro to React Native
aarongreenwald
4
850
Other Decks in Programming
See All in Programming
500万人が利用する「友達と遊べるたまり場アプリ パラレル」におけるデータベース基盤の継続的改善
yoheimuta
5
3.8k
スタートアップの急成長に寄り添うOn-Call体制構築とその変遷
horimislime
3
1.1k
AHC035解説
terryu16
0
880
AWSの生成AI活用事例集GenUを使い倒す
komakichi
0
420
今こそ始める Shared Element Transition
oidy
1
170
UnJSを使って軽率にCLIを作ってみたらめちゃくちゃ便利だった / create CLI with UnJS
drumath2237
3
990
Senior Crafters
dupdob
0
370
JEPs の変遷から眺める Vector API / Tracking the Progress of Vector API via JEPs
mackey0225
1
120
AWS初心者ってどうやってAWSを学ぶ?〜アプリエンジニアがやってよかったアーキテクチャ学習方法〜
yamanashi_ren01
0
340
生成AIを使ってAmplifyGen2を楽しく学べるワークショプをやってみた
mkdev10
2
220
Jetpack ComposeのBottomSheetとの戦い / Fight with BottomSheet of Jetpack Compose
kubode
0
110
サーバーレスパターンを元にAWS CDKでデータ基盤を構築する / 20240731_classmethod_odyssey_online_build_a_data_infrastructures_using_aws_cdk_based_on_serverless_patterns
kasacchiful
0
240
Featured
See All Featured
Fireside Chat
paigeccino
31
2.9k
It's Worth the Effort
3n
181
27k
Rails Girls Zürich Keynote
gr2m
93
13k
Leading Effective Engineering Teams 2024
addyosmani
16
410
ReactJS: Keep Simple. Everything can be a component!
pedronauck
662
120k
Visualization
eitanlees
142
15k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Creatively Recalculating Your Daily Design Routine
revolveconf
215
11k
Side Projects
sachag
451
42k
KATA
mclloyd
26
13k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
107
6.8k
Scaling GitHub
holman
458
140k
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]