I have a react component that has a state attribute called Report
. It conforms to the following interface:
interface Report {
firstname: string;
lastname: string;
otherinfo: info[];
}
interface info {
dob: string;
gender: string;
email: string;
}
I'd like to know the preferred way of doing setState
if I want to update the value of email
.