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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Adam Conrad
March 26, 2019
Programming
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
More Decks by Adam Conrad
See All by Adam Conrad
Code review in JavaScript
acconrad
0
690
The Dos and Don'ts of CBRA
acconrad
0
89
A-Frame and You
acconrad
0
49
UX and Performance
acconrad
0
64
SX - Startup Experience
acconrad
0
77
Other Decks in Programming
See All in Programming
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
530
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
4
2.8k
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
180
Lessons from Spec-Driven Development
simas
PRO
0
150
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
380
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
860
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
180
Agentic UI
manfredsteyer
PRO
0
120
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
150
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
170
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
210
AIとRubyの静的型付け
ukin0k0
0
560
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.6k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Rails Girls Zürich Keynote
gr2m
96
14k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
How to Think Like a Performance Engineer
csswizardry
28
2.6k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
KATA
mclloyd
PRO
35
15k
Google's AI Overviews - The New Search
badams
0
1k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
310
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
610
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?