Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
0
2.6k
Visual Intro to Custom React Hooks
Lightning talk @ Reactadelphia July 2019! melody.dev/custom-hooks
Inky Collective
July 16, 2019
Tweet
Share
More Decks by Inky Collective
See All by Inky Collective
Glowing Up... with Ponies!
pixely
0
63
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
170
Sweetie Bot, Part 3 by Cloud Hop (#PonyDev @ BronyCon 2018)
pixely
0
89
Pony Podcast Programming by Corpulent Brony (#PonyDev @ BronyCon 2018)
pixely
1
100
How Equestria Was Made: Building EFNW's Website by Pixely (Everfree Northwest 2018)
pixely
0
430
IRC: Why it Failed by Cadey (#PonyDev @ Everfree Northwest 2018)
pixely
0
98
Other Decks in Technology
See All in Technology
Snowflakeでデータ基盤を もう一度作り直すなら / rebuilding-data-platform-with-snowflake
pei0804
5
1.5k
OCI Oracle Database Services新機能アップデート(2025/09-2025/11)
oracle4engineer
PRO
1
170
LLM-Readyなデータ基盤を高速に構築するためのアジャイルデータモデリングの実例
kashira
0
240
AWS CLIの新しい認証情報設定方法aws loginコマンドの実態
wkm2
6
730
Sansanが実践する Platform EngineeringとSREの協創
sansantech
PRO
2
850
re:Invent 2025 ~何をする者であり、どこへいくのか~
tetutetu214
0
210
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
世界最速級 memcached 互換サーバー作った
yasukata
0
340
今年のデータ・ML系アップデートと気になるアプデのご紹介
nayuts
1
330
「Managed Instances」と「durable functions」で広がるAWS Lambdaのユースケース
lamaglama39
0
310
乗りこなせAI駆動開発の波
eltociear
1
1.1k
Challenging Hardware Contests with Zephyr and Lessons Learned
iotengineer22
0
190
Featured
See All Featured
[SF Ruby Conf 2025] Rails X
palkan
0
510
A Tale of Four Properties
chriscoyier
162
23k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
100
Raft: Consensus for Rubyists
vanstee
141
7.2k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Optimizing for Happiness
mojombo
379
70k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
What's in a price? How to price your products and services
michaelherold
246
13k
Documentation Writing (for coders)
carmenintech
76
5.2k
How to train your dragon (web standard)
notwaldorf
97
6.4k
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