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.6k
0
Share
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
69
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
180
Sweetie Bot, Part 3 by Cloud Hop (#PonyDev @ BronyCon 2018)
pixely
0
99
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
110
Other Decks in Technology
See All in Technology
Vision Banana: Image Generators are Generalist Vision Learners
kzykmyzw
0
350
20260507-ACL-seminar
satoshi5884
0
110
「強制アップデート」か「チームの自律」か?エンタープライズが辿り着いたプラットフォームのハイブリッド運用/cloudnative-kaigi-hybrid-platform-operations
mhrtech
0
180
2026年春のAgentCoreアプデ 細かいやつ全部まとめ
minorun365
3
220
Agent の「自由」と「安全」〜未来に向けて今できること〜
katayan
0
350
生成AIはソフトウェア開発の革命か、ソフトウェア工学の宿題再提出なのか -ソフトウェア品質特性の追加提案-
kyonmm
PRO
2
870
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
100k
要件定義の精度を高めるための型と生成AIの活用 / Using Types and Generative AI to Improve the Accuracy of Requirements Definition
haru860
0
320
世界の中心でApp Runnerを叫ぶ FINAL
tsukuboshi
0
260
AI時代に、 データアナリストがデータエンジニアに異動して
jackojacko_
0
710
ESP32 IoTを動かしながらメモリ使用量を観測してみた話
zozotech
PRO
0
100
AIの揺らぎに“コシ”を与える階層化品質設計
ickx
0
270
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Google's AI Overviews - The New Search
badams
0
1k
Discover your Explorer Soul
emna__ayadi
2
1.1k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
560
GraphQLとの向き合い方2022年版
quramy
50
15k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
140
WENDY [Excerpt]
tessaabrams
10
37k
Tell your own story through comics
letsgokoyo
1
920
Mind Mapping
helmedeiros
PRO
1
190
Practical Orchestrator
shlominoach
191
11k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Paper Plane
katiecoart
PRO
1
50k
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