Apply What You Have Learned
With this newly gained knowledge about refs and portals, it's again time to practice what you have learned.
Below, you'll find two activities that allow you to practice working with refs and portals. As always, you will, of course, also need some of the concepts covered in earlier chapters (e.g., working with state).
Activity 7.1: Extract User Input Values
In this activity, you have to add logic to an existing React component to extract values from a form. The form contains an input field and a drop-down menu and you should make sure that, upon form submission, both values are read and, for the purpose of this dummy app, output to the browser console.
Use your knowledge about Refs and uncontrolled components to implement a solution without using React state.
Note
You can find the starting code for this activity at https://packt.link/PAvKn. When downloading this code, you'll always download the entire repository. Make sure...