Custom Hooks in React - Every React Developer Should Know This

Поделиться
HTML-код
  • Опубликовано: 12 янв 2025

Комментарии • 48

  • @ByteGrad
    @ByteGrad  11 месяцев назад +8

    My Professional React & Next.js course is OUT NOW now! Find it here: bytegrad.com/courses/professional-react-nextjs -- this is the #1 resource to master the latest React & Next.js, my absolute best work.

  • @seventyMinus1
    @seventyMinus1 11 месяцев назад +49

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

    • @ByteGrad
      @ByteGrad  11 месяцев назад +7

      Thanks, appreciate it! More to come!

    • @seventyMinus1
      @seventyMinus1 11 месяцев назад

      😍🥰@@ByteGrad

  • @djdisconap
    @djdisconap 6 дней назад +1

    Thanks for this video! Wesley's explanation of the 3 design patterns of when to use a component, utility function and a custom hook it was so simple yet perfect. I also appreciate that it had both JavaScript and TypeScript in video. Custom hooks seemed so much more complicated prior to this video. Keep it up!

  • @dMDzn
    @dMDzn 11 месяцев назад +8

    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!

  • @adarsh16p7
    @adarsh16p7 5 месяцев назад +3

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

  • @cbunn81
    @cbunn81 11 месяцев назад +6

    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;
    }

    • @Osirisdigitalagency
      @Osirisdigitalagency 10 месяцев назад

      I was just about to say that

    • @dace9294
      @dace9294 5 месяцев назад +2

      How you can handle this in the future or maybe use it somewhere else, you can't track this functionality with CSS.
      the whole idea of the video is the concept of separation of concern, so let the CSS handle the styling and let JS handle the functionality.

  • @Pareshbpatel
    @Pareshbpatel 3 месяца назад +1

    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}

  • @irfantayyib
    @irfantayyib 9 месяцев назад +1

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

  • @seagull2345
    @seagull2345 11 месяцев назад +3

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

  • @abhijeetkumar8044
    @abhijeetkumar8044 11 месяцев назад +2

    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🙏

  • @real23lions
    @real23lions 10 месяцев назад

    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 💯 .

  • @brailegawigawen
    @brailegawigawen 11 месяцев назад

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

    • @ByteGrad
      @ByteGrad  11 месяцев назад +1

      Amazing, welcome to the courses and enjoy! :)

  • @MuhammadUmair-gy5le
    @MuhammadUmair-gy5le 11 месяцев назад +3

    Thanks ByteGrad. Your content is really helpfull for me 👍

  • @yourlinuxguy
    @yourlinuxguy 7 месяцев назад +1

    Thankyou for the ideas about where to use what.

  • @neelimaneelu195
    @neelimaneelu195 10 месяцев назад +1

    Honestly an amazing video

  • @mjylove2
    @mjylove2 7 месяцев назад +1

    finally understood. thank you so much ! amazing job

  • @AlexanderBelov-y8o
    @AlexanderBelov-y8o 11 месяцев назад +3

    Will watch this during dinner!

  • @darkcss1054
    @darkcss1054 9 месяцев назад +1

    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.

  • @HoussemBahri-nn3qt
    @HoussemBahri-nn3qt 3 месяца назад +1

    Great video !

  • @dayank.8499
    @dayank.8499 10 месяцев назад

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

  • @mohammednasser2159
    @mohammednasser2159 11 месяцев назад +3

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

    • @flexdash
      @flexdash 11 месяцев назад +1

      Or cast the return value `as const`

  • @p1erceprc
    @p1erceprc 11 месяцев назад +2

    which vscode theme is this? thx

  • @mjylove2
    @mjylove2 8 месяцев назад +1

    this is a masterpiece

  • @chrishanthacosta4093
    @chrishanthacosta4093 15 дней назад +1

    best teacher

  • @bryson2662
    @bryson2662 11 месяцев назад +2

    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

  • @goatslayer5957
    @goatslayer5957 10 месяцев назад +1

    Cool ztuff!

  • @saajanbajaj641
    @saajanbajaj641 9 месяцев назад

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

  • @AmirulIslam-p3m6k
    @AmirulIslam-p3m6k 2 месяца назад +1

    Do you have any courses on Udemy ?

  • @jacquelynecarmen
    @jacquelynecarmen 11 месяцев назад

    More videos like this ❤

  • @isaacjon
    @isaacjon 11 месяцев назад

    hey bro, i want to try an offline frontend course from sourceryacademy in lithuania. After the course they are wiling to give job offer for best students. But i need some financial help to live there during this course( 3 month) because i am not european and not living near lithuania.

  • @PrMovies0
    @PrMovies0 11 месяцев назад

    Really Really helpful thanks ❤️

  • @bryson2662
    @bryson2662 11 месяцев назад +4

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

  • @demicoderr
    @demicoderr 11 месяцев назад +1

    Wow, just wow.

  • @0xtz_
    @0xtz_ 11 месяцев назад +2

    👀 amazing

  • @mrBurlaka1
    @mrBurlaka1 10 месяцев назад

    custom hooks don't have to use react base hooks

  • @complikatd
    @complikatd 11 месяцев назад +1

    Thanks for fixing your mic