Custom Hooks in React – Every React Developer Should Know This
👉 NEW React & Next.js Course: https://bytegrad.com/courses/professional-react-nextjs
Hi, I’m Wesley. I’m a brand ambassador for Kinde (paid sponsorship). Add auth to your React app fast: https://bit.ly/3QOe1Bh
👉 NEW React & Next.js Course: https://bytegrad.com/courses/professional-react-nextjs
👉 Professional JavaScript Course: https://bytegrad.com/courses/professional-javascript
👉 Professional CSS Course: https://bytegrad.com/courses/professional-css
👉 Web development roadmap 2024 & 2025: https://email.bytegrad.com
👉 Email newsletter (BIG update soon): https://email.bytegrad.com
👉 Discord: all my courses have a private Discord where I actively participate
⏱️ Timestamps:
0:00 Overview
0:48 Pattern 1 (Components)
2:47 Pattern 2 (Utility function)
6:17 Pattern 3 (Custom hook)
15:20 Rules of custom hooks
16:13 Return array vs object
18:57 Custom hook benefits
20:16 Typescript generics
26:43 Other custom hooks
#webdevelopment #programming #coding #reactjs #nextjs