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
Building a macOS screen saver with Kotlin (Android Makers 2025)
zsmb
1
130
コンテナでLambdaをデプロイするときに知っておきたかったこと
_takahash
0
170
メモリウォールを超えて:キャッシュメモリ技術の進歩
kawayu
0
1.8k
いまさら聞けない生成AI入門: 「生成AIを高速キャッチアップ」
soh9834
15
4.4k
Develop Faster With FrankenPHP
dunglas
2
3.1k
gen_statem - OTP's Unsung Hero
whatyouhide
1
190
タイムゾーンの奥地は思ったよりも闇深いかもしれない
suguruooki
1
480
Bedrock×MCPで社内ブログ執筆文化を育てたい!
har1101
1
220
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
1k
フロントエンドテストの育て方
quramy
11
2.9k
Code smarter, not harder - How AI Coding Tools Boost Your Productivity | Webinar 2025
danielsogl
0
110
PsySHから紐解くREPLの仕組み
muno92
PRO
1
540
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
GraphQLとの向き合い方2022年版
quramy
45
14k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
7
640
Writing Fast Ruby
sferik
628
61k
Designing for humans not robots
tammielis
252
25k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Making the Leap to Tech Lead
cromwellryan
133
9.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Transcript
Architecture that Works React Native Code Reuse Aaron Greenwald github.com/aarongreenwald
@aaronjgreenwald aarong@wix.com
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 aarong@wix.com