Closed rizhalmaulana closed 3 years ago
I think this is your problem:
- setShowAlert({
- showAlert: false
- });
+ setShowAlert(false);
@rizhalmaulana Mark pointed out the correct solution, hope it works now. Use setShowAlert
to set boolean values instead of objects.
const AddTagRegister = () => { const [tagId, setTagId] = useState(''); const [tagData, setTagData] = useState(''); const [tagCycle, setValueCycle] = useState(''); const [tagType, setValueType] = useState(''); const [showAlert, setShowAlert] = useState(false); const [requestAddRegister, errorMessage] = useResults();
};