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's Lost Socks: Where Did I Put that Compon...
Search
Adam Conrad
March 26, 2019
Programming
0
150
React's Lost Socks: Where Did I Put that Component?
This talk aims to add structure for production-ready React applications. Hopefully.
Adam Conrad
March 26, 2019
Tweet
Share
More Decks by Adam Conrad
See All by Adam Conrad
Code review in JavaScript
acconrad
0
590
The Dos and Don'ts of CBRA
acconrad
0
67
A-Frame and You
acconrad
0
36
UX and Performance
acconrad
0
52
SX - Startup Experience
acconrad
0
53
Other Decks in Programming
See All in Programming
HTML/CSS超絶浅い説明
yuki0329
0
190
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
210
Beyond ORM
77web
11
1.6k
知られざるDMMデータエンジニアの生態 〜かつてツチノコと呼ばれし者〜
takaha4k
1
510
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
240
Jaspr Dart Web Framework 박제창 @Devfest 2024
itsmedreamwalker
0
150
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
410
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
return文におけるstd::moveについて
onihusube
1
1.4k
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
1.9k
Оптимизируем производительность блока Казначейство
lamodatech
0
960
Featured
See All Featured
Facilitating Awesome Meetings
lara
51
6.2k
Making Projects Easy
brettharned
116
6k
It's Worth the Effort
3n
183
28k
Into the Great Unknown - MozCon
thekraken
34
1.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
240
Statistics for Hackers
jakevdp
797
220k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
What's in a price? How to price your products and services
michaelherold
244
12k
Become a Pro
speakerdeck
PRO
26
5.1k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Gamification - CAS2011
davidbonilla
80
5.1k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Transcript
React’s Lost Socks Where did I put that component?
None
None
(Everything in its right place)
Who in the h*ck are you??
@theadamconrad
Why are we here?
React deserves structure
None
None
None
Such segmentati on
Such segmentati on Lol wut tests
Such segmentati on Lol wut tests Are u too good
for ur home
Such segmentati on Lol wut tests Are u too good
for ur home
None
None
None
None
Some prereqs
Some prereqs
None
CCU Pattern
CCU Pattern MVC for the front-end
CCU Pattern MVC for the front-end Component
CCU Pattern MVC for the front-end Component => Model Container
CCU Pattern MVC for the front-end Component => Model Container
=> Controller Utility
CCU Pattern MVC for the front-end Component => Model Container
=> Controller Utility => View
None
Prereqs For real apps React (duh) Apollo & GraphQL React
Router Styled-components Formik Typescript (optional)
None
0. Set up routes
None
1. Add a page/route
None
None
2. Add a component
None
None
3. Add tests (you know you want to)
None
None
4. Component too big? Split it up
None
None
None
5. Component doing too much? Add a utility
None
None
None
6. Nested containers? Not a problem!
None
None
None
None
None
7. Writing data? We got that too!
None
None
None
None
None
8. App doing too much? Split it up!
None
9. THERE IS NO STEP NINE
None
In summary
In summary Touching data? CONTAINER
In summary Touching data? CONTAINER Passing data? COMPONENT
In summary Touching data? CONTAINER Passing data? COMPONENT Adding logic?
UTILITY
None
Kthnxbye. questions?