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
820
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
410
Learn Once, Write Anywhere - Intro to React Native (2)
aarongreenwald
0
120
Learn Once, Write Anywhere: Intro to React Native
aarongreenwald
4
950
Other Decks in Programming
See All in Programming
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
300
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
490
AIコーディングAgentとの向き合い方
eycjur
0
270
rage against annotate_predecessor
junk0612
0
170
How Android Uses Data Structures Behind The Scenes
l2hyunwoo
0
450
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
310
旅行プランAIエージェント開発の裏側
ippo012
2
910
Vue・React マルチプロダクト開発を支える Vite
andpad
0
110
個人軟體時代
ethanhuang13
0
320
はじめてのMaterial3 Expressive
ym223
2
380
実用的なGOCACHEPROG実装をするために / golang.tokyo #40
mazrean
1
270
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
20
11k
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
140
7.1k
Statistics for Hackers
jakevdp
799
220k
How GitHub (no longer) Works
holman
315
140k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Gamification - CAS2011
davidbonilla
81
5.4k
Designing for humans not robots
tammielis
253
25k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
The Art of Programming - Codeland 2020
erikaheidi
56
13k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Code Reviewing Like a Champion
maltzj
525
40k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
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]