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
Visual Intro to Custom React Hooks
Search
Inky Collective
July 16, 2019
Technology
2.7k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Visual Intro to Custom React Hooks
Lightning talk @ Reactadelphia July 2019! melody.dev/custom-hooks
Inky Collective
July 16, 2019
More Decks by Inky Collective
See All by Inky Collective
Glowing Up... with Ponies!
pixely
0
73
lo-fi hip hop beats to npm install to!
pixely
0
2.9k
Web Development w/ IE6 (like it’s 2018!)
pixely
0
1.8k
Spooking Your Friends with Electron (BrooklynJS #59)
pixely
0
3.4k
Rebble.io by Peach Hack (#PonyDev @ BronyCon 2018)
pixely
0
190
Sweetie Bot, Part 3 by Cloud Hop (#PonyDev @ BronyCon 2018)
pixely
0
110
Pony Podcast Programming by Corpulent Brony (#PonyDev @ BronyCon 2018)
pixely
1
110
How Equestria Was Made: Building EFNW's Website by Pixely (Everfree Northwest 2018)
pixely
0
450
IRC: Why it Failed by Cadey (#PonyDev @ Everfree Northwest 2018)
pixely
0
120
Other Decks in Technology
See All in Technology
SRE Next 2026 何でも屋からの脱却
bto
0
840
個人開発で育てる「大規模設計の苗床」 - AI時代の1人開発から始める業務への知識接続 / The Seedbed for Large-Scale Design - From AI-Era Solo Projects to Professional Knowledge
bitkey
PRO
1
270
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
110k
なぜ私たちのSREプラクティスはなかなか機能しないのか 〜システムより先に組織を見る〜 / Why our SRE practices aren't really working
vtryo
4
3.9k
LLM/Agent評価:トップ営業の発言を「正解」にする 〜暗黙的正解による評価を営業資産に変える〜
takkuhiro
1
230
関数型の考えを TypeScript に持ち込んで、テストしやすい純粋関数を増やす / Pure at the Core, Effects at the Edge: Bringing Functional Thinking into TypeScript
kaminashi
2
130
Control Planeで育てるBtoB SaaSの認証基盤 - SRE NEXT 2026
pokohide
1
2.5k
ガバナンスの「ちょうどいい落とし所」を探れ!開発スピードを妨げない運用判断の勘所 / SRE NEXT 2026
genda
1
200
SREとQA 二人三脚で進めるSLO運用/sre-qa-slo
sugitak
0
730
オブザーバビリティ、本当に活用できてる? 〜API連携×生成AIで成熟度を自動評価〜
dmmsre
1
3.4k
Compose 新機能総まとめ / What's New in Jetpack Compose
yanzm
0
300
ポストモーテム! DDoSからサイトは守れた。 でもビジネスは守れなかった。
bengo4com
1
3.2k
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9.5k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
GraphQLとの向き合い方2022年版
quramy
50
15k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Designing Powerful Visuals for Engaging Learning
tmiket
1
450
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1k
エンジニアに許された特別な時間の終わり
watany
108
250k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
How to make the Groovebox
asonas
2
2.3k
The agentic SEO stack - context over prompts
schlessera
0
840
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
200
Balancing Empowerment & Direction
lara
6
1.2k
Transcript
Custom React Hooks! by Melody, 1x engineer ✨ Reactadelphia July
2019
hey hi, i’m melody! they/them { , , , }
melody.dev
Let’s talk hooks. “They let you use state and other
React features without writing a class.” —Dan Abramov
Say you have a blog:
Where can custom hooks be used? “where is stateful logic
involved?” “can this logic be reused?”
Where can custom hooks be used? <NavItem> <ReadIndicator> <ToggleTheme>
Where can custom hooks be used? history user preferences
Let’s make a hook! psst… they’re just functions! • it
has to start with `use` • you can use other hooks in them • notably, useState() and other custom hooks!
Hooks in action: useHistory() <NavItem> <ReadIndicator>
Hooks on the net! usehooks.com
useDarkMode() usehooks.com/useDarkMode
Hooks in action: useHistory() <NavItem> <ReadIndicator> useDarkMode() <Application> <ToggleTheme>
Hooks in action: useHistory() <NavItem> <ReadIndicator> useDarkMode() <Application> <ToggleTheme>
useYourImagination() Here are some helpful resources: • https://reactjs.org/docs/hooks-custom.html • https://usehooks.com
useThankYou() @pixelyunicorn @melody melody.dev/custom-hooks patreon.com/madebymelody SW-4207-5422-1528