In React 19, ref is just a prop
forwardRef is no longer needed. A function component receives ref like any other prop.
function Input({ ref, ...props }: React.ComponentProps<"input">) {
return <input ref={ref} {...props} />;
}Existing forwardRef code still works, and a codemod removes it. New components should just take the prop.
react