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
360
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
Immutable ActiveRecord
megane42
0
140
Domain-Driven Transformation
hschwentner
2
1.9k
技術を根付かせる / How to make technology take root
kubode
1
240
『品質』という言葉が嫌いな理由
korimu
0
160
Software Architecture
hschwentner
6
2.1k
Formの複雑さに立ち向かう
bmthd
1
810
SwiftUIで単方向アーキテクチャを導入して得られた成果
takuyaosawa
0
270
GAEログのコスト削減
mot_techtalk
0
120
[JAWS-UG横浜 #79] re:Invent 2024 の DB アップデートは Multi-Region!
maroon1st
1
140
データの整合性を保つ非同期処理アーキテクチャパターン / Async Architecture Patterns
mokuo
45
16k
お前もAI鬼にならないか?👹Bolt & Cursor & Supabase & Vercelで人間をやめるぞ、ジョジョー!👺
taishiyade
5
3.9k
Flutter × Firebase Genkit で加速する生成 AI アプリ開発
coborinai
0
150
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
223
9.3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
Designing for humans not robots
tammielis
250
25k
What's in a price? How to price your products and services
michaelherold
244
12k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Designing for Performance
lara
604
68k
Docker and Python
trallard
44
3.3k
Scaling GitHub
holman
459
140k
How STYLIGHT went responsive
nonsquared
98
5.4k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.6k
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]