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
150
0
Share
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
680
The Dos and Don'ts of CBRA
acconrad
0
76
A-Frame and You
acconrad
0
46
UX and Performance
acconrad
0
61
SX - Startup Experience
acconrad
0
73
Other Decks in Programming
See All in Programming
3分でわかるatama plusのQA/about atama plus QA
atamaplus
0
120
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
130
Strategy for Finding a Problem for OSS: With Real Examples
kibitan
0
140
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
830
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
560
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
230
見せてもらおうか、 OpenSearchの性能とやらを!
shunta27
1
180
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
3
740
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
130
RSAが破られる前に知っておきたい 耐量子計算機暗号(PQC)入門 / Intro to PQC: Preparing for the Post-RSA Era
mackey0225
3
120
Swift Concurrency Type System
inamiy
0
350
へんな働き方
yusukebe
6
2.9k
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
270
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
250
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.3k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.4k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
210
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Ruling the World: When Life Gets Gamed
codingconduct
0
190
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?