Input membuat penundaan log konsol
const submitHandler = (e) => {
e.preventDefault();
if (input === "") {
setError(true);
}
}
useEffect(() => {
// No need for === true
if (error) {
console.log("error");
return;
}
console.log("success");
}, [error])
Poised Porpoise