I have a component that stores a contact object as state - {firstName: \"John\", lastName: \"Doe\", phone: \"1234567890} I want to create a form to edit this object but if I
You can do it without duplicate code and easy way
handleChange=(e)=>{ this.setState({ [e.target.id]:e.target.value }) }