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
640
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
69
Other Decks in Programming
See All in Programming
複雑なフォームに立ち向かう Next.js の技術選定
macchiitaka
2
220
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
280
@Environment(\.keyPath)那么好我不允许你们不知道! / atEnvironment keyPath is so good and you should know it!
lovee
0
120
Putting The Genie in the Bottle - A Crash Course on running LLMs on Android
iurysza
0
140
Android端末で実現するオンデバイスLLM 2025
masayukisuda
1
170
個人軟體時代
ethanhuang13
0
330
Navigating Dependency Injection with Metro
zacsweers
3
2.5k
Laravel Boost 超入門
fire_arlo
3
220
楽して成果を出すためのセルフリソース管理
clipnote
0
190
デザイナーが Androidエンジニアに 挑戦してみた
874wokiite
0
550
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
2.4k
rage against annotate_predecessor
junk0612
0
170
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1032
460k
A Modern Web Designer's Workflow
chriscoyier
696
190k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
The Language of Interfaces
destraynor
161
25k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Building Applications with DynamoDB
mza
96
6.6k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
Bash Introduction
62gerente
615
210k
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?