Q62: How does React 19 simplify passing `ref` down to functional components without forwardRef?

React 19 allows passing ref as a standard prop directly to functional components (e.g., <MyInput ref={inputRef} />). The component receives ref alongside other props in its parameter list (function MyInput({ ref, label })), making React.forwardRef obsolete for standard component wrapping.

Key Takeaways
  • ref can be passed and read as a standard prop in functional components.
  • Eliminates the necessity for wrapping functional components in React.forwardRef.
Knowledge Check

In React 19, how is a ref accessed inside a functional child component?