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
140
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
66
A-Frame and You
acconrad
0
36
UX and Performance
acconrad
0
50
SX - Startup Experience
acconrad
0
52
Other Decks in Programming
See All in Programming
快速入門可觀測性
blueswen
0
330
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
1
370
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
270
ドメインイベント増えすぎ問題
h0r15h0
1
210
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
2
460
Semantic Kernelのネイティブプラグインで知識拡張をしてみる
tomokusaba
0
180
たのしいparse.y
ydah
3
120
Beyond ORM
77web
2
290
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
440
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
690
103 Early Hints
sugi_0000
1
220
Featured
See All Featured
Docker and Python
trallard
42
3.1k
Building an army of robots
kneath
302
44k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
GraphQLとの向き合い方2022年版
quramy
44
13k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Automating Front-end Workflow
addyosmani
1366
200k
Typedesign – Prime Four
hannesfritz
40
2.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
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?