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
810
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
380
Learn Once, Write Anywhere - Intro to React Native (2)
aarongreenwald
0
110
Learn Once, Write Anywhere: Intro to React Native
aarongreenwald
4
920
Other Decks in Programming
See All in Programming
Devinのメモリ活用の学びを自社サービスにどう組み込むか?
itarutomy
0
2.1k
S3静的ホスティング+Next.js静的エクスポート で格安webアプリ構築
iharuoru
0
220
Firebase Dynamic Linksの代替手段を自作する / Create your own Firebase Dynamic Links alternative
kubode
0
240
gen_statem - OTP's Unsung Hero
whatyouhide
1
200
Unlock the Potential of Swift Code Generation
rockname
0
250
ミリしらMCP勉強会
watany
4
740
Optimizing JRuby 10
headius
0
180
Youtube Lofier - Chrome拡張開発
ninikoko
0
2.4k
Vibe Codingをせずに Clineを使っている
watany
17
6.1k
AI時代の開発者評価について
ayumuu
0
120
スモールスタートで始めるためのLambda×モノリス(Lambdalith)
akihisaikeda
2
250
タイムゾーンの奥地は思ったよりも闇深いかもしれない
suguruooki
1
600
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
660
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Agile that works and the tools we love
rasmusluckow
328
21k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
A designer walks into a library…
pauljervisheath
205
24k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Product Roadmaps are Hard
iamctodd
PRO
52
11k
4 Signs Your Business is Dying
shpigford
183
22k
Building Adaptive Systems
keathley
41
2.5k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.4k
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]