Remember, the less state your app handles the better. event.target.name and So how I would approach this is to store the values in your state using what is called a controlled component. DE. The form element itself can have events. By Defining the onChange event: Define the name property to each input element (name should be same as state variable name it will help to . We can access a form control element by its (zero-based) index in the form, in the following way: Please note that HTMLFormElement.elements only takes into account form control elements; i.e.,