#26 React forwardRef, Simplified, with examples

Sdílet
Vložit
  • čas přidán 29. 07. 2024
  • We've looked at the ref hook previously which allows us to attach refs to DOM elements. Where does the forwardRef function come in with these? In this lesson, we dive into forwardRef, and see how useful it is with examples.
    Resources:
    * Course Website: simplereact.dev/
    You can find the code used in this video here: github.com/dillionmegida/reac...
    Join my discord here: deeecode.com/discord
    Timestamp:
    00:00 Recap on Refs with Demo
    01:53 Where would you need forwardRef?
    04:06 How to use forwardRef
    06:40 Use forwardRefs all the time?
    _____
    Subscribe to My Channel: bit.ly/deeecode
    _____
    🌟 About Me:
    Dillion Megida, creator of DEEECODE, is a Software Engineer, Developer Advocate and a Content Creator passionate about simplifying topics around Tech via articles and videos.
    _____
    ⚡️ Connect with me:
    - Personal youtube: / dillionmegida
    - Personal website: dillionmegida.com/
    - Twitter: / iamdillion
    - Instagram: / deeecode
    - LinkedIn: / dillionmegida
    - GitHub: github.com/dillionmegida
  • Věda a technologie

Komentáře • 4

  • @hustlersfuel
    @hustlersfuel Před 21 dnem

    Wow! Awesome style of teaching, thank you, I finally grasped the concept behind forwardRef, thank you!

  • @chineduknight6426
    @chineduknight6426 Před 3 měsíci

    I have been following your video series, and it's really great. The way you dive into the react concepts with practical examples is simply genius.
    I was actually looking to understand better what ref is and the useRef and useForwardRef and also what happens if I passed a state update function to a ref, eg
    const [count, setCount] = useState(0)
    const updateCount = ()=>{setCount(count+1)}
    After seeing your video and doing some experiments I have figured this out thanks a lot deecode

  • @Mayank-qk6ui
    @Mayank-qk6ui Před 26 dny

    Bro you teach well

  • @asustufa1515
    @asustufa1515 Před 4 měsíci

    What's your vscode theme?