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
850
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
440
Learn Once, Write Anywhere - Intro to React Native (2)
aarongreenwald
0
130
Learn Once, Write Anywhere: Intro to React Native
aarongreenwald
4
970
Other Decks in Programming
See All in Programming
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
110
AgentCoreとHuman in the Loop
har1101
5
230
CSC307 Lecture 04
javiergs
PRO
0
660
2026年 エンジニアリング自己学習法
yumechi
0
130
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
MUSUBIXとは
nahisaho
0
130
Fragmented Architectures
denyspoltorak
0
150
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
今から始めるClaude Code超入門
448jp
8
8.6k
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
120
Patterns of Patterns
denyspoltorak
0
1.4k
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.3k
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
320
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
57
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
410
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.5k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
910
Scaling GitHub
holman
464
140k
Un-Boring Meetings
codingconduct
0
200
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
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]