Why is event.preventDefault() not working here?
When I click the submit button it automatically refreshes the code, can anyone tell what I'm doing wrong? I'm starting to lose my mind:
When I click the submit button it automatically refreshes the code, can anyone tell me what I'm doing wrong? I'm starting to lose my mind:
Input";
export default function VerifyEmail() {
function handleSubmit(event: FormEvent<HTMLFormElement>) {
event.preventDefault();
console.log("works");
}
return (
<form onSubmit={handleSubmit}>
<FormInput
isRequired={true}
label="Verify Email"
name="email"
type="email"
/>
<FormButton name="Continue" />
</form>
);
}
Posted Jan 8, 2024, 9:25 PM UTC
10