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 Component?
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
490
The Dos and Don'ts of CBRA
acconrad
0
55
A-Frame and You
acconrad
0
31
UX and Performance
acconrad
0
47
SX - Startup Experience
acconrad
0
48
Other Decks in Programming
See All in Programming
Elm Form Validation
bkuhlmann
0
500
puregoの活用例
aethiopicuschan
0
220
Folding Cheat Sheet #2
philipschwarz
PRO
0
110
甘い香りに誘われてVanilla Extractを1年間運用してみた
miyahkun
1
110
VSCodeでのDatabricks開発もお勧めしたい/I would also recommend Databricks development with VSCode.
kazumain
0
240
Ruby GitHub Packages
bkuhlmann
0
620
TYPO3 v13 – The road to LTS: What's new and new APIs
luisasofie_xoxo
0
180
Site Reliability Engineering for GMO
pyama86
6
900
Ruby製社内ツールのGo移行
bgpat
2
330
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
3
630
What We Can Learn From OSS
inouehi
0
400
ドメイン・ファーストで考える問題解決に役立つモデル設計 / Domain First Model Design
suzushin54
2
2.1k
Featured
See All Featured
Clear Off the Table
cherdarchuk
83
310k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
The Invisible Customer
myddelton
114
12k
We Have a Design System, Now What?
morganepeng
42
6.7k
Documentation Writing (for coders)
carmenintech
59
3.9k
The Art of Programming - Codeland 2020
erikaheidi
41
12k
Building Your Own Lightsaber
phodgson
98
5.7k
Making the Leap to Tech Lead
cromwellryan
123
8.5k
Thoughts on Productivity
jonyablonski
57
3.8k
Fireside Chat
paigeccino
20
2.6k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
In The Pink: A Labor of Love
frogandcode
138
21k
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?