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
630
The Dos and Don'ts of CBRA
acconrad
0
70
A-Frame and You
acconrad
0
40
UX and Performance
acconrad
0
58
SX - Startup Experience
acconrad
0
65
Other Decks in Programming
See All in Programming
5つのアンチパターンから学ぶLT設計
narihara
1
110
CursorはMCPを使った方が良いぞ
taigakono
1
180
GraphRAGの仕組みまるわかり
tosuri13
8
480
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
250
git worktree × Claude Code × MCP ~生成AI時代の並列開発フロー~
hisuzuya
1
480
エンジニア向け採用ピッチ資料
inusan
0
160
すべてのコンテキストを、 ユーザー価値に変える
applism118
2
800
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
330
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
270
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
120
AIプログラマーDevinは PHPerの夢を見るか?
shinyasaita
1
120
技術同人誌をMCP Serverにしてみた
74th
1
360
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
337
57k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
17
940
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Balancing Empowerment & Direction
lara
1
370
Navigating Team Friction
lara
187
15k
Raft: Consensus for Rubyists
vanstee
140
7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.8k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
790
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?