A Trick Every React Developer Should Know: Ref Forwarding

Опубликовано: 31 October 2024
на канале: Josh tried coding
20,629
835

Ref forwarding comes in super useful when building reusable components in your React app. By forwarding a ref, we get access to a DOM node in the child component the right way - because in React, you can't pass a ref as props.

0:00 Why bother learning?
0:23 The theory
4:20 The solution

⭐ My GitHub: https://github.com/joschan21
⭐ Our startup: https://wordful.ai