Please consider asking the question at our spectrum channel.
I've tried the spectrum channel chat and it keeps eating my messages and I don't know why. I'm so sad 😢
https://spectrum.chat/react-hook-form
Describe the question?
I'd like to show a toast with error message after handleSubmit executed. But I don't know how to "handle this event". Maybe we could have two callbacks arguments like handleSubmit(resolved, rejected) ?
To Reproduce
No need to reproduce.
Codesandbox link
Take this from Examples - Register Error Messages as an example.
https://codesandbox.io/s/o766kp4z05
Screenshots
No screenshots.
Additional context
const onSubmit = () => {
// do your logic here
}
useEffect(() => {
// do your logic here
}, [errors])
handleSubmit(onSubmit)
Most helpful comment