Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Custom Hooks in React - Every React Developer Should Know This

ByteGrad via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn to create and implement custom hooks in React through a comprehensive 28-minute tutorial that covers three essential patterns for code organization and reusability. Explore the evolution from basic component structure to utility functions, then advance to custom hooks implementation with practical examples. Master the fundamental rules governing custom hooks, understand the decision-making process between returning arrays versus objects, and discover the key benefits of using custom hooks in your React applications. Dive into TypeScript generics integration for type-safe custom hooks and examine various other custom hook patterns that every React developer should understand for building more maintainable and efficient applications.

Syllabus

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

Taught by

ByteGrad

Reviews

Start your review of Custom Hooks in React - Every React Developer Should Know This

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.