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
660
The Dos and Don'ts of CBRA
acconrad
0
72
A-Frame and You
acconrad
0
42
UX and Performance
acconrad
0
59
SX - Startup Experience
acconrad
0
71
Other Decks in Programming
See All in Programming
AIと協働し、イベントソーシングとアクターモデルで作る後悔しないアーキテクチャ Regret-Free Architecture with AI, Event Sourcing, and Actors
tomohisa
2
8.9k
AIエージェントでのJava開発がはかどるMCPをAIを使って開発してみた / java mcp for jjug
kishida
4
770
Phronetic Team with AI - Agile Japan 2025 closing
hiranabe
2
670
Developing Specifications - Jakarta EE: a Real World Example
ivargrimstad
0
200
Private APIの呼び出し方
kishikawakatsumi
3
900
GeistFabrik and AI-augmented software development
adewale
PRO
0
180
歴史から学ぶ「Why PHP?」 PHPを書く理由を改めて理解する / Learning from History: “Why PHP?” Rediscovering the Reasons for Writing PHP
seike460
PRO
0
170
Level up your Gemini CLI - D&D Style!
palladius
1
110
AI時代もSEOを頑張っている話
shirahama_x
0
170
高単価案件で働くための心構え
nullnull
0
160
知られているようで知られていない JavaScriptの仕様 4選
syumai
0
630
イベントストーミングのはじめかた / Getting Started with Event Storming
nrslib
1
700
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1371
200k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
How to train your dragon (web standard)
notwaldorf
97
6.4k
What's in a price? How to price your products and services
michaelherold
246
12k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Site-Speed That Sticks
csswizardry
13
970
BBQ
matthewcrist
89
9.9k
The Language of Interfaces
destraynor
162
25k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
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?