Yup, React Hook Form, isValid Access
I've spent hours today reading discussion threads on how to access isValid
outside of a Formik form component. But every solution I found looks overkill.
Then I stumbled upon React Hook Form and it had saved my day! ☕
With its easy integration with Yup, I can finally use the isValid
state of my form anywhere in my component. 🎉
A submit button can now live outside a form and still listen to the form state (for enabling or disabling it for instance) thanks to RHF's useForm
hook.