Daniel Barda• 240
@daniel-barda
Posted
Good job 😊.
I recommend using guard clauses in case the user doesn't enter anything in the email input.
function handleSubmit(e) {
e.preventDefault();
if (!emailInput) return setIsValidEmail(false);
setShowSuccessModal(true);
}
Marked as helpful
1
Manish Patel• 730
@savvystrider
Posted
@daniel-barda Thank you!
0