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
Awesome React Hooks
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
thereactboy
October 12, 2019
Programming
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Awesome React Hooks
thereactboy
October 12, 2019
More Decks by thereactboy
See All by thereactboy
Demystifying React Hooks
tathagat2006
1
200
Other Decks in Programming
See All in Programming
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
110
カツオ、ご期待ください
suneo3476
0
190
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
790
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.2k
ChromeでローカルLLM
ryu1013
0
140
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
460
SREの越境 / SRE Collaboration
y0hgi
2
310
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.5k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
A Soul's Torment
seathinner
8
3.8k
Unsuck your backbone
ammeep
672
58k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
The browser strikes back
jonoalderson
0
1.8k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
990
Designing Powerful Visuals for Engaging Learning
tmiket
1
610
GitHub's CSS Performance
jonrohan
1033
470k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
550
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
550
YesSQL, Process and Tooling at Scale
rocio
174
15k
Transcript
Demystifying React Hooks
• Software Developer and Mentor at Coding Blocks. • Co-Founder
@ Voz, A content community platform thevoz.in • Final Year Student, B.E. Computer Engineering, Thapar University. Tathagat Thapliyal
Eder Labs
What, Why and How?
“To think creatively, we must be able to look afresh
at what we normally take for granted” - George Keller A react feature that lets you use state and Lifecycles without writing a class based react component.
But, Why React, first ?
• Reusable Components • Data Flow • Enjoy writing code
Problem with REACT ?
• Reusing stateful logic • Huge Components • Class is
confusing
Dang It! It should work
Most forgetful and toughest error to figure out for beginners
Code smelling all over the place Might need to duplicate this in some other component Class based component
1389 Lines!!! Dumb Component!
Ways to deal with the problems? • Higher Order Components
(HOC Patterns) • Render Props
HOC Patterns
HOC
HOC Patterns
Render Props • Objects • Arrays • Strings • Functions
• Boolean
WRAPPER HELL!!
None
So What? ♂ HOCs Render Props Hooks Reuse Stateful Logic
✅ ✅ ❓ Explicit Props ❌ ✅ ❓ Composability ✅ ❌ ❓ No “Wrapper Hell” ❌ ❌ ❓
SPOILER ALERT!! HOCs Render Props Hooks Reuse Stateful Logic ✅
✅ ✅ Explicit Props ❌ ✅ ✅ Composability ✅ ❌ ✅ No “Wrapper Hell” ❌ ❌ ✅
UseState( )
UseEffect( )
More Hooks API’s Basic Hooks • useState() • useContext() •
useEffect() Advanced Hooks • useReducer() • useCallback() • useEffect() • useMemo() • useRef()
• Easier to work with . • Easier to test.
• More readability. • Few lines of code. • No new component formation on DOM. Conclusion?
Half screen photo slide if text is necessary References •
https://www.polidea.com/blog/react-hooks-vs-wr apper-hell-writing-state-in-a-function-with-ease/ • https://blog.logrocket.com/frustrations-with-react- hooks/ • https://reactjs.org/docs/hooks-intro.html • https://medium.com/@jackyef/react-hooks-why- we-should-embrace-it-86e408663ad6
Thank You @tathagat2006 @sumoneisback001 Tathagat Thapliyal @tathagat2006