Multiple Inputs

When you need to handle multiple controlled input elements, you have to add a name attribute to each element and let the handler method choose what to do based on the value of event.target.name.

See the Pen ELJqLP by Bunlong (@Bunlong) on CodePen.

Updated: