Custom Hooks in React - Every React Developer Should Know This

preview_player
Показать описание


👉 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
Рекомендации по теме
Комментарии
Автор

I don’t know why, but this teacher is the only one on YouTube whom I can listen to and watch all day without getting distracted. I sincerely hope he continue make more videos regularly.

seventyMinus
Автор

A very comprehensive tutorial on code reuse in React. So much information imparted in so short a time. Thank you very much, Wesley

{2024-09-19}

Pareshbpatel
Автор

Your mention of TS generics at the end was the cherry on top - a perfect use case that a lot of beginners will actually come across. Good job!

dMDzn
Автор

Wow, those statements at the beginning explained everything. Thank you so much for introducing those lines to us.

adarshp
Автор

I know the point was to make something in JavaScript, but it is possible to captalize only the first letter of the first word in a string using only CSS. You just have to use the *::first-letter* pseudo element along with the *text-transform* property. For example, to make the first letter of every *li* element capitalized:

li::first-letter {
text-transform: capitalize;
}

cbunn
Автор

Perfect timing. Im just starting to learn about custom hooks and when and where to use them. Thank you for this great explanation!

seagull
Автор

Your storytelling and editing is really good here. Glad you improved over the years because your content has always been great. Now the content delivery is 💯 .

reallions
Автор

Keep it up sir! Always needed a teacher like you.

irfantayyib
Автор

Everytime i learn a lot from you videos on react core concepts. Thanks @ByteGrad for the react core concepts videos. Please make more on performance improvements🙏

abhijeetkumar
Автор

Thankyou for the ideas about where to use what.

yourlinuxguy
Автор

i came upon some of your videos just now, subscribed and immediately purchased your courses. *also, thanks for the discounts. highly appreciated!

brailegawigawen
Автор

finally understood. thank you so much ! amazing job

mjylove
Автор

Thanks ByteGrad. Your content is really helpfull for me 👍

MuhammadUmair-gyle
Автор

I'd love a video on zustand as I am struggling to understand how am I supposed to transfer state from component to page and vice versa.

darkcss
Автор

You could've passed the generic type to the useState type parameter to simplify things

mohammednasser
Автор

You could've passed the generic parameter to the usestate function and you would get better typing without needing to type the return function in the last example

bryson
Автор

This, as well as the previous video of yours that I just finished (12 react hooks mistakes), are the best how to/general learning videos I've ever come across on any topic.

CHUCKYCHUCKYBOBUCY
Автор

thank you for this video, but I don't know if we can apply this method with the selected items from detail List

dayank.
Автор

What If, I want to store multiple value in same file then have to init custom hook everytime?

saajanbajaj
Автор

You can capitalize the first letter using just css by the way. First-letter and transform uppercase

bryson