Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumReactforwardRefSingle-choice MCQ

Why does wrapping a function component in `forwardRef` not, by itself, let the parent call a method like `focus()` defined inside that component, and what closes the gap?

const Input = forwardRef((props, ref) => { // ref is forwarded here return <input {...props} />; });