© Adam Freeman 2019
Adam FreemanPro React 16https://doi.org/10.1007/978-1-4842-4451-7_15

15. Forms and Validation

Adam Freeman1 
(1)
London, UK
 
Forms allow applications to collect data from the user. In this chapter, I explain how React works with form elements, using state properties to set their value and event handlers to respond to user interactions. I show you how to work with different element types and show you how to validate the data that the user provides in a form so that the application receives data it can use. Table 15-1 puts forms and validation in context.
Table 15-1

Putting Forms and Validation in Context

Question

Answer

What are they?

Forms are the basic mechanism that allows applications to prompt the user for data. Validation is the ...

Get Pro React 16 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.