Create a generic React onChange function to handle the onChange event on multiple inputs.
onChange = (e) => {
let value = e.target.type === 'checkbox' ? e.target.checked : e.target.value;
this.setState({ [e.target.name]: value });
}
Create a generic React onChange function to handle the onChange event on multiple inputs.
onChange = (e) => {
let value = e.target.type === 'checkbox' ? e.target.checked : e.target.value;
this.setState({ [e.target.name]: value });
}