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
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
64
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
91
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
100
Other Decks in Technology
See All in Technology
The Engineer with a Three-Year Cycle
e99h2121
0
140
Master Dataグループ紹介資料
sansan33
PRO
1
4.2k
Eight Engineering Unit 紹介資料
sansan33
PRO
0
6.3k
#22 CA × atmaCup 3rd 1st Place Solution
yumizu
1
220
AI時代のアジャイルチームを目指して ー スクラムというコンフォートゾーンからの脱却 ー / Toward Agile Teams in the Age of AI
takaking22
11
6.8k
チームで安全にClaude Codeを利用するためのプラクティス / team-claude-code-practices
tomoki10
7
3.4k
2025年 山梨の技術コミュニティを振り返る
yuukis
0
160
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
330
Oracle Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
3
380
Node vs Deno vs Bun 〜推しランタイムを見つけよう〜
kamekyame
1
510
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
これまでのネットワーク運用を変えるかもしれないアプデをおさらい
hatahata021
3
190
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
How GitHub (no longer) Works
holman
316
140k
Writing Fast Ruby
sferik
630
62k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
150
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1.1k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
270
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
120
Making the Leap to Tech Lead
cromwellryan
135
9.7k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
89
Un-Boring Meetings
codingconduct
0
180
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
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