arrow_backBACK TO DRILLS
White Beltuseref

forwardRef required for parent ref access

A parent component passes a ref to a custom MyInput component and later calls ref.current.focus(). However, ref.current is always null. MyInput renders an <input> internally but is defined as a normal function component. What is the most likely cause?