Reactjs – Altering checkbox state in react js
This is my code for check box in react. Its from Material-UI const [checkmark, setCheckMark] = useState(false); const [selectedRows, setSelectedRows] = useState([]); const toggleAllCheck = (event) => { console.log("before", checkmark); setCheckMark(!checkmark); console.log("after", checkmark); let newSelectedRows; if (checkmark) { newSelectedRows =…