#1 Data Analytics Program in India
₹2,499₹1,499Enroll Now
4 min read
Question 25 of 48medium

forwardRef

Passing refs to child components.

What is forwardRef?

forwardRef lets a component receive a ref and forward it to a child component.

Why Needed?

Function components don't have instances, so refs don't work by default. forwardRef passes the ref through.