i am trying to handle checkbox in my react app but i am not able to it. here is my usestate of communication
const [data, setData] = useState({
phone: "",
notice: { paper: true, court: false, labour: false }
});
below is my change handler for that
const handleDataChange = (event) => {
setData({ ...data, ...notice, [e.target.id]: ![e.target.value] });
};
will any one look into this and help me out
idsof checkboxes?. Also you are spreadingnoticewithout having access to it since it is a property ofdataobject.paper,court, andlabour?