How Do React Hooks Actually Work? React.js Deep Dive #3

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ธ.ค. 2024

ความคิดเห็น • 60

  • @sanjeettiwari9000
    @sanjeettiwari9000 3 ปีที่แล้ว +46

    You just blew my mind with those useEffect and useState implementations. Great work, man.

    • @PhilipFabianek
      @PhilipFabianek  3 ปีที่แล้ว +8

      Thank you! It also blew my mind when I saw it for the first time.

  • @basimalhomaidi
    @basimalhomaidi 2 หลายเดือนก่อน +2

    wow .
    and that's exactly how experienced developer explain complex to topics to beginner developers.
    👏👏👏👏👏👏

  • @Virtualexist
    @Virtualexist ปีที่แล้ว +6

    This is Gold content. Learning react was getting very tasteless and like rote learning for me. This was very helpful to rekindle the interest.

  • @zm690
    @zm690 2 ปีที่แล้ว +7

    This series is exactly what I wanted. Beyond the beginner level and understand behind the sense. 😀

  • @jayt2257
    @jayt2257 2 ปีที่แล้ว +2

    I did this very thing with useState so I reversed engineered it in my mind. I asked the same questions about the order and wondered how the counter could be incremented, and I concluded an array and global counter/index. Great work!

  • @wlockuz4467
    @wlockuz4467 ปีที่แล้ว +1

    I just had a mind explosion moment when you showed the custom useState and useEffect hooks. It makes so much sense now why we can't use hooks anywhere but at the top level!

  • @Nageswararao93
    @Nageswararao93 4 หลายเดือนก่อน +1

    Excellent video. I'm really impressed on the video's content quality. Looking forward to more videos like this, thanks a lot

  • @BartekSpitza
    @BartekSpitza 9 หลายเดือนก่อน +1

    Amazing video. This was exactly what I was looking for, sadly I had to scroll several times as the top videos titled with “how react actually works” were all just shallow reiterations of the react API.. thank you!

  • @TischenkoPasha
    @TischenkoPasha ปีที่แล้ว +1

    Thank you! Great professional job done with this videos, wish you all the best!

  • @leolin652
    @leolin652 2 ปีที่แล้ว +2

    This video is awesome. Looking forward to your new videos. Thanks!

  • @simpledeveloper8081
    @simpledeveloper8081 2 ปีที่แล้ว +2

    Hi Philip, thank you (from Uzbekistan) very much for such great tutorial. appreciate your advanced videos.

  • @bafellah9727
    @bafellah9727 ปีที่แล้ว +1

    It's exactly what I was looking for , Great work,thank you

  • @SahraClayton
    @SahraClayton 2 ปีที่แล้ว +1

    This has just blew my mind, just when I thought I was just starting to understand react

  • @cyberpsybin
    @cyberpsybin 2 ปีที่แล้ว +4

    Excellent tutorial. Only doubt remains is as to why React team decided to go with Arrays and indexes to store hooks.
    We could use objects and as long out component identifies correctly, hook can be retrieved reliably even if all hooks don't run.

    • @PhilipFabianek
      @PhilipFabianek  2 ปีที่แล้ว +1

      Thank you. I agree that it might've been implemented in a different way but there is probably a reason as to why the React team went with arrays.

    • @wlockuz4467
      @wlockuz4467 ปีที่แล้ว

      Really interesting questions, did you find any answers to this?

  • @tanercoder1915
    @tanercoder1915 ปีที่แล้ว +1

    as promised this video is really a deep dive

  • @bishwajeetpandey1570
    @bishwajeetpandey1570 ปีที่แล้ว +1

    Wow so much helpful, i really Love this type of video which tells how the thing work behind the scenes.

  • @stanislautsishkou5632
    @stanislautsishkou5632 ปีที่แล้ว

    The most important content for thouse who switching from another framework!

  • @yasin9544
    @yasin9544 2 ปีที่แล้ว +1

    Excellent video. I'm really impressed on the video's content quality

  • @maciekkolod
    @maciekkolod ปีที่แล้ว +1

    Great stuff, thanks!

  • @brianl6329
    @brianl6329 3 ปีที่แล้ว +2

    Thank you for your work!

  • @ВолодимирГолойда-м7н
    @ВолодимирГолойда-м7н 2 ปีที่แล้ว +1

    hello from Ukraine.N1ce video mate, thanks a lot!

  • @ArshadAnsari-sf1zd
    @ArshadAnsari-sf1zd 2 ปีที่แล้ว +1

    lot of knowledge thanks man'

  • @ameeruljunaidi6123
    @ameeruljunaidi6123 2 ปีที่แล้ว +1

    This is excellent, thank you!

  • @yangpsiphon7980
    @yangpsiphon7980 2 ปีที่แล้ว +1

    Amazing course. Thanks a lot!

  • @大盗江南
    @大盗江南 3 ปีที่แล้ว +3

    This is a bit complicated for a beginner ToT.... but super good video! thanks buddy!

    • @PhilipFabianek
      @PhilipFabianek  3 ปีที่แล้ว +2

      Yes, those videos are intented for advanced React developers. Thanks for the feedback!

  • @abhishekcode
    @abhishekcode 5 วันที่ผ่านมา

    Make a video of types of examples as hooks using in production with example

  • @AvinashKumar-ve7ss
    @AvinashKumar-ve7ss 2 หลายเดือนก่อน

    2:40 someone please tell me how It will cause Infinite loop?

    • @thanhkhuu4167
      @thanhkhuu4167 หลายเดือนก่อน

      Because if there is no condition, then every time React rerenders the component, it will set the state again and React rerenders again and again -> infinite loop

  • @ottamindtrip2757
    @ottamindtrip2757 ปีที่แล้ว +1

    thanks for this amazing video, it blew my mind

  • @devkiosk
    @devkiosk ปีที่แล้ว +1

    Very good explanation.

  • @user-oortcloud
    @user-oortcloud 5 หลายเดือนก่อน +1

    Thank you!

  • @LuisAnducho
    @LuisAnducho 3 ปีที่แล้ว +3

    This is very well explained! Thank you! Did you put the code for this lesson somewhere?

    • @PhilipFabianek
      @PhilipFabianek  3 ปีที่แล้ว +3

      I'm planning to use CodePen in the future, but for now I uploaded it here: drive.google.com/file/d/1eTApzbYx_jiAhJBbDTsA4FvkHXDbiQMY/view

    • @LuisAnducho
      @LuisAnducho 3 ปีที่แล้ว +3

      @@PhilipFabianek Awesome! Please keep up that great job. This series about how react works under the hood was eye opening

    • @Urek38
      @Urek38 ปีที่แล้ว

      @@PhilipFabianek This link is no longer working, can you share a new one ? Thanks !

  • @snehasisdebbarman3106
    @snehasisdebbarman3106 ปีที่แล้ว +2

    Bro casually created MiniReact😅

  • @trannhathao3978
    @trannhathao3978 2 ปีที่แล้ว +1

    In reality, setState function is async. Is there any difference with your example?

    • @PhilipFabianek
      @PhilipFabianek  2 ปีที่แล้ว +3

      Yes there is quite a difference. React uses Fibers under its hood (check out the previous video) and the implementation of useState is quite different in reality. If you want to learn more and perhaps see how useState can be implemented in React Fiber, check out pomb.us/build-your-own-react/

    • @trannhathao3978
      @trannhathao3978 2 ปีที่แล้ว

      @@PhilipFabianek Thank you!

  • @arminfisher4836
    @arminfisher4836 2 ปีที่แล้ว +1

    Good stuff.

  • @kokoyroy
    @kokoyroy 3 ปีที่แล้ว +2

    Bro u are awesome

  • @programmingwithnit5308
    @programmingwithnit5308 ปีที่แล้ว +1

    Thank you so much

  • @otis2646
    @otis2646 ปีที่แล้ว +1

    is it fine that i find it little hard to understand

    • @PhilipFabianek
      @PhilipFabianek  ปีที่แล้ว +2

      Especially if this is your first time seeing something like this it is completely fine, try to rewatch the video a few times or maybe sleep on it and then you will definitely understand it better

  • @MahmoudAshraf
    @MahmoudAshraf 3 ปีที่แล้ว +2

    u r awsome

  • @sarcasticdna
    @sarcasticdna 2 ปีที่แล้ว +2

    This is some god level stuff
    please keep posting these kind of videos
    Int`ernet is already full of shitty beginner tutorials
    💗💗