DEV Community

Discussion on: Understanding the use of useRef hook & forwardRef in React

Collapse
 
sajithpradeep profile image
Sajith Pradeep

Thanks for bringing in this perspective. I will try this out. It makes more sense as there are multiple instances where forwarding the hooks is required and this helps us stick to the DRY principle.

Collapse
 
karem1986 profile image
Karem

could u please explain what is the DRY principle? and if you have the link to test the code from github that would be awesome please :)