Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
Developing static sites with Ruby
okuramasafumi
0
290
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
320
SwiftUIで本格音ゲー実装してみた
hypebeans
0
390
開発に寄りそう自動テストの実現
goyoki
2
1k
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
110
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
190
WebRTC と Rust と8K 60fps
tnoho
2
2k
Microservices rules: What good looks like
cer
PRO
0
1.4k
chocoZAPサービス予約システムをNuxtで内製化した話
rizap_tech
0
120
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
240
Go コードベースの構成と AI コンテキスト定義
andpad
0
130
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
470
Featured
See All Featured
Designing for Performance
lara
610
69k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
Thoughts on Productivity
jonyablonski
73
5k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
What's in a price? How to price your products and services
michaelherold
246
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Optimizing for Happiness
mojombo
379
70k
RailsConf 2023
tenderlove
30
1.3k
Typedesign – Prime Four
hannesfritz
42
2.9k
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]