React Hooks Tutorial | The useRef Hook

Поделиться
HTML-код
  • Опубликовано: 3 окт 2024
  • An explanation of the useRef Hook in React. React's useRef Hook allows us to access DOM elements in functional components. I also talk about Declarative vs. Imperative programming approaches. Created by Gregg Fine.
    📖 Download my FREE "Google Search Secrets for Developers" Cheat Sheet:
    store.thecodec...
    🗣JOIN the Code Creative Facebook group! :
    / 1612600368887577
    🔴Subscribe for more free Code Creative videos: : / @thecodecreative
    🌐 The Code Creative Official Website
    www.thecodecre...
    🎓 The Code Creative Courses
    www.thecodecre...
    ✅ Recommended related videos:
    Web Audio API: Exploring Oscillators
    www.youtube.co....
    Web Audio API: createOscillator and Audio Nodes
    www.youtube.co....
    Web Audio API: What is Audio Context?
    www.youtube.co....
    ✅ For business inquiries contact me at gregg@greggfinedev.com
    ✅ Let's connect:
    Twitter - @GreggFine
    Instagram - /greggfineguitar
    Facebook - /hiddentigermusic

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

  • @TheCodeCreative
    @TheCodeCreative  4 года назад +1

    To subscribe to the channel: ruclips.net/channel/UCmOpHGj4JRWCdXhllVTZCVw

  • @fikilekentane6982
    @fikilekentane6982 7 месяцев назад +2

    ….u dude .. u are plain good … tnx for such a clear and beautiful explanation of userRef .. from now on .. I’m your BIG fan 🙏🏾

  • @timbauer399
    @timbauer399 2 года назад +1

    This was beautiful!!! So useful. Thanks for posting!

  • @losbur5416
    @losbur5416 3 года назад +1

    Omg one more perfect explanation on this channel of how hooks work. Thank you so much

  • @HannaKarenNasc
    @HannaKarenNasc Год назад

    I love that you explain everything in detail and you're also straightforward. Thanks for the video! I love it!

  • @ranjanrnj6864
    @ranjanrnj6864 3 года назад +1

    Thank you it was a neatly explained video, and your music is awesome

  • @arthurradium5823
    @arthurradium5823 4 года назад +2

    Hello !! I just discover your channel. Thank you soo much for explaining react in a comprehensive and fun way !!!. Love it!

    • @TheCodeCreative
      @TheCodeCreative  4 года назад +1

      Thanks Arthur, glad it was helpful to you!

  • @Elator11777
    @Elator11777 3 года назад +1

    Please make videos about other hooks! Your explanation is the best! The music is superb!

    • @TheCodeCreative
      @TheCodeCreative  3 года назад

      Thanks Andrey! I have an entire React Hooks playlist here: ruclips.net/p/PLMPgoZdlPumdViYuJPRQ7wqrztNp3ZcuE

  • @ocoocososococosooooosoococoso
    @ocoocososococosooooosoococoso 3 года назад +1

    way easier to understand the useRef hooks, thanks for sharing.

  • @Elator11777
    @Elator11777 3 года назад +2

    excellent! Only you have real examples, not the 10000 focus examples from all other tutorials! Thank you!

  • @alvinacosta2312
    @alvinacosta2312 4 года назад +1

    You have a way with teaching. Good job. I hope you continue doing this and get thousands of subs. here is one now! I also do hope you create react project tutorials. keep it up, man! we are waiting for more tuts :)

    • @TheCodeCreative
      @TheCodeCreative  4 года назад +1

      Thanks Alvin and thanks for subscribing! More tuts coming soon 👍🏻👍🏻👍🏻

  • @zameeebasha
    @zameeebasha 4 года назад +1

    Nice and clear as the audio file 😉

  • @abeechr
    @abeechr 4 года назад +1

    Wow nice work! Where have you been all this time? Keep em coming. :)

  • @gligorpecev5199
    @gligorpecev5199 4 года назад +1

    Great teaching voice

  • @tanzeemahmed8609
    @tanzeemahmed8609 4 года назад +1

    Thanks for great react videos. I had a question, can you suggest an order in which one must watch your react hooks playlist? Thanks

    • @TheCodeCreative
      @TheCodeCreative  4 года назад +1

      I would start with useState and then useEffect. Those are probably the most essential Hooks. After that, look at the Custom Hooks video. Then, useContext. Finally, the useRef/forwardRef vids. Hope that helps!

    • @tanzeemahmed8609
      @tanzeemahmed8609 4 года назад +1

      @@TheCodeCreative Thanks a ton.

    • @TheCodeCreative
      @TheCodeCreative  4 года назад

      @@tanzeemahmed8609 you're welcome

  • @yashwanthsrini
    @yashwanthsrini Год назад +1

    thanks

  • @baseerx
    @baseerx 4 года назад +1

    How to call child component method from parent component on click function using useRef,please help i am unable to call child component method.

    • @TheCodeCreative
      @TheCodeCreative  3 года назад

      Why not just put the function in the parent component? If the child component needs access to it, you could pass it down as a prop.

  • @saivivekravi4681
    @saivivekravi4681 3 года назад +1

    Which theme you are using I like the theme

    • @TheCodeCreative
      @TheCodeCreative  3 года назад

      It's called "Shades of Purple"

    • @saivivekravi4681
      @saivivekravi4681 3 года назад

      @@TheCodeCreative but shade of purple is very dark in purple have you customized it

    • @TheCodeCreative
      @TheCodeCreative  3 года назад

      @@saivivekravi4681 I don't believe I had customized it as far as I can recall.

  • @abeechr
    @abeechr 3 года назад +1

    Audio doesn't play for me. Went over it line by line. Could Chrome be blocking playback? Also used the latest Create-react-app, 17.0.1 Perhaps this is the issue?

    • @TheCodeCreative
      @TheCodeCreative  3 года назад

      It could be Chrome blocking playback. Take a look at this and see if it helps: ruclips.net/video/sLXcuCrBL-M/видео.html

    • @abeechr
      @abeechr 3 года назад

      @@TheCodeCreative Thanks, but no luck. In terms of a React component and the code from your demo:
      useEffect(() => {
      audioRef.current.play()
      }, [ ])
      How would I check if suspend has been called?

  • @TheCodeCreative
    @TheCodeCreative  2 года назад

    📖 Download my FREE "Google Search Secrets for Developers" Cheat Sheet:
    store.thecodecreative.com/google-secrets-cheat-sheet

  • @TheCodeCreative
    @TheCodeCreative  4 года назад

    🗣JOIN the Code Creative Facebook group! :
    facebook.com/groups/1612600368887577

  • @piaere
    @piaere 2 года назад

    Your videos are great but please stop inserting annoying stock images and sounds, they're distracting and not funny:)