Replies: 1 comment 3 replies
-
Could you provide more detailed code including |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
Does anyone know why below is triggering the useEffect to run even when the error object are exactly the same.? When i click submit twice, I didnt expect the effect to run because the errors are the same..
thanks! :)
const {
formState: { errors: validationErrors, isDirty, isSubmitting, isValid },
getValues,
setValue,
handleSubmit,
reset,
watch,
control,
} = useForm({
mode: 'all',
resolver: zodResolver(validationSchema),
defaultValues: defaultValue,
});
useEffect(() => {
alert();
}, [validationErrors]);
Beta Was this translation helpful? Give feedback.
All reactions