const { value, name } = e.target; this.setState({ [name]: value }); code example
Example: const name value = event.target
let person = {
name: 'David',
age: 15,
job: 'Programmer'
}
const { name, age } = person; // Takes the property/method from the object
console.log(name); // Prints 'David'
console.log(age); // Prints '15'