$30 off During Our Annual Pro Sale. View Details »
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
90
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
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
1
400
ペアーズにおけるAIエージェント 基盤とText to SQLツールの紹介
hisamouna
2
1.5k
まだ間に合う! Agentic AI on AWSの現在地をやさしく一挙おさらい
minorun365
17
2.5k
AI時代のワークフロー設計〜Durable Functions / Step Functions / Strands Agents を添えて〜
yakumo
3
2k
AI駆動開発の実践とその未来
eltociear
1
480
マイクロサービスへの5年間 ぶっちゃけ何をしてどうなったか
joker1007
19
7.5k
Agent Skillsがハーネスの垣根を超える日
gotalab555
6
4k
AWSの新機能をフル活用した「re:Inventエージェント」開発秘話
minorun365
2
430
障害対応訓練、その前に
coconala_engineer
0
190
20251203_AIxIoTビジネス共創ラボ_第4回勉強会_BP山崎.pdf
iotcomjpadmin
0
130
Amazon Connect アップデート! AIエージェントにMCPツールを設定してみた!
ysuzuki
0
130
シニアソフトウェアエンジニアになるためには
kworkdev
PRO
3
260
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
How GitHub (no longer) Works
holman
316
140k
The agentic SEO stack - context over prompts
schlessera
0
560
How to train your dragon (web standard)
notwaldorf
97
6.4k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
1
210
Paper Plane (Part 1)
katiecoart
PRO
0
1.9k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
71
Accessibility Awareness
sabderemane
0
24
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
16
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
680
The Curious Case for Waylosing
cassininazir
0
190
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
850
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