Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
84
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
120
Pony Podcast Programming by Corpulent Brony (#PonyDev @ BronyCon 2018)
pixely
1
120
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
130
Other Decks in Technology
See All in Technology
え、こんなに早く改修できるの?──新人エンジニアとスクラムマスターの2人が語る、AI×アジャイル開発の現場
ysasago
2
580
越境するなら専門用語を使うな高校校歌 / If you wanna cross border, you shouldn't use jargon
vtryo
0
150
Claude Codeを「使うほど育つ」AI秘書にするノウハウ
minorun365
PRO
33
29k
aws-iot-platform-architecture-use-cases.pdf
ma2shita
0
430
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
2
980
GoのInterface内部構造から学ぶ!最高パフォーマンスを出すコード設計
yappli_developers
1
210
開発投資の期待値を上げるプロダクトロードマップづくり ~プロダクトエンジニアが越境して事業を伸ばす~
kekekenta
1
230
作って終わりじゃないサーバーレス 〜9年運用する大規模EC物流API基盤の設計・運用のリアル〜
zozotech
PRO
0
360
LLMに渡さなかった仕事
nanaism
0
1.2k
CLIライブラリ開発を支える技術
htnabe
0
140
AIで社員の自主発信に広報目線を組み込む
_mossann_t
0
130
事業課題から技術的負債に向き合う
sansantech
PRO
2
2k
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
500
Code Review Best Practice
trishagee
74
20k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
30 Presentation Tips
portentint
PRO
1
400
Ruling the World: When Life Gets Gamed
codingconduct
0
340
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
500
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
The untapped power of vector embeddings
frankvandijk
2
1.9k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
890
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