I have Multiple properties and everyone has it own state. How do I state multiple states at the same time ? There is this one way
ChangeName(event){
const details = this.state.details;
details.first_name = event.target.value;
this.setState({details: details});
}
and bind it this way
this.ChangeName = this.ChangeName.bind(this);
So I have a form with these different properties
this.state={
details :{first_name: "",
last_name:"",
address:"",
company:"",
number:"",
dob:""
}
So do I have create function for every property and bind everyone separately the way I mentioned above ? Or is there any other way that I am not aware of as I am new to react.
Thank you !