9 Working with forms in React
This chapter covers
- Defining forms and form elements
- Capturing changes to form data
- Updating data in form elements
- Accessing form elements through events and references
- Using controlled or uncontrolled inputs
Imagine the web without forms: You can’t log in anywhere. You can’t order anything in a web shop. You can’t chat with anyone. And, you can’t even complain about it because there’s no contact form!
Forms are the backbone of many interactive web applications. Forms, and form elements in particular, are the primary way to capture user input in input fields, check boxes, drop-downs, file uploads, and a bunch more related elements.
Because forms are so important, any decent web framework has to support handling ...
Get React Quickly, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.