setstate e.target.name code example
Example 1: 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'
Example 2: event.target.name in setstate
inputChangeHandler: function ({ target: { id, value }) {
this.setState({ [id]: value });
},