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
790
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
370
Learn Once, Write Anywhere - Intro to React Native (2)
aarongreenwald
0
100
Learn Once, Write Anywhere: Intro to React Native
aarongreenwald
4
910
Other Decks in Programming
See All in Programming
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
230
Datadog Workflow Automation で圧倒的価値提供
showwin
1
290
Kotlinの開発でも AIをいい感じに使いたい / Making the Most of AI in Kotlin Development
kohii00
5
1.5k
sappoRo.R #12 初心者セッション
kosugitti
0
280
コードを読んで理解するko build
bells17
1
110
もう少しテストを書きたいんじゃ〜 #phpstudy
o0h
PRO
19
4.2k
Learning Kotlin with detekt
inouehi
1
160
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
160
Lambdaの監視、できてますか?Datadogを用いてLambdaを見守ろう
nealle
2
520
Webフレームワークとともに利用するWeb components / JSConf.jp おかわり
spring_raining
1
120
React 19アップデートのために必要なこと
uhyo
8
1.6k
Rails 1.0 のコードで学ぶ find_by* と method_missing の仕組み / Learn how find_by_* and method_missing work in Rails 1.0 code
maimux2x
1
260
Featured
See All Featured
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Product Roadmaps are Hard
iamctodd
PRO
51
11k
Large-scale JavaScript Application Architecture
addyosmani
511
110k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
580
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
21
2.5k
How to train your dragon (web standard)
notwaldorf
91
5.9k
Automating Front-end Workflow
addyosmani
1369
200k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
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