I've got an form with different inputs that populates the next state defined like
const [userTaxData, setUserTaxData] = React.useState({
businessName: "",
rfc: "",
address: {
street: "",
number: 0,
suburb: "",
city: "",
state: "",
country: "",
zcode: 0
}
});
and the handleChange function defined like
const handleChange = (e) => {
setUserTaxData({
...userTaxData,
[e.target.name]: e.target.value
});
};
But the problema I've faced is that when I try to change the "zcode" property it is not working and it is because is inside the "address" object, so I need you support because I don't know how to access to "address" properties.