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
800
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
100
Learn Once, Write Anywhere: Intro to React Native
aarongreenwald
4
920
Other Decks in Programming
See All in Programming
AIコードエディタの基盤となるLLMのFlutter性能評価
alquist4121
0
150
エンジニア未経験が最短で戦力になるためのTips
gokana
0
220
爆速スッキリ! Rspack 移行の成果と道のり - Muddy Web #11
dora1998
1
160
新卒から4年間、20年もののWebサービスと 向き合って学んだソフトウェア考古学
oguri
8
7k
2025/3/18 サービスの成長で生じる幅広いパフォーマンスの問題を、 AIで手軽に解決する
shirahama_x
0
170
Return of the Full-Stack Developer
simas
PRO
1
320
WordPress Playground for Developers
iambherulal
0
120
Coding Experience Cpp vs Csharp - meetup app osaka@9
harukasao
0
220
아직도 SOLID 를 '글'로만 알고 계신가요?
sh1mj1
0
360
フロントエンドテストの育て方
quramy
11
2.7k
20250326_生成AIによる_レビュー承認システムの実現.pdf
takahiromatsui
17
5.8k
CRE Meetup!ユーザー信頼性を支えるエンジニアリング実践例の発表資料です
tmnb
0
460
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
91
5.9k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Side Projects
sachag
452
42k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.5k
The Cost Of JavaScript in 2023
addyosmani
48
7.6k
Producing Creativity
orderedlist
PRO
344
40k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
2.9k
Optimizing for Happiness
mojombo
377
70k
Become a Pro
speakerdeck
PRO
27
5.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Facilitating Awesome Meetings
lara
53
6.3k
Agile that works and the tools we love
rasmusluckow
328
21k
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]