React 19 accepts ref as a regular prop.
Before:
1const MyInput = forwardRef((props, ref) => (2 <input ref={ref} {...props} />3));
After:
1function MyInput({ ref, ...props }) {2 return <input ref={ref} {...props} />;3}
Benefits: