Chapter 9 · Example 6 · Refs: from storing data to imperative API
Passing a ref as a prop
The form creates a ref and passes it to InputField as a regular prop, which attaches it to its input so the parent can focus the child's DOM element.
Loading live editor…