DEV Community

Discussion on: Forms in React Native, The right way 😎

Collapse
 
martincernyawin profile image
Martin Cerny

I have tried to implement it with the latest react-hook-form, but it doesn't work. Looks like the problem is with 5.5.2 release github.com/react-hook-form/react-h...

Collapse
 
elaziziyoussouf profile image
Elazizi Youssouf

Fixed

Collapse
 
r1ckyrockz profile image
Riccardo

First, thanks for the idea of a wrapper for forms with react native!

I tried your fixed version and came to the same resolution, that the validation isn't working well.

Example:
Enter the following values on your prototype (snack.expo.io/@yjose/form-in-react...
Name: asdf
Email: asdf -> then correct to aasdf@gmail.com
Password: anything you want

-> submit

Result: all fields are invalid :-( Hopefully you can help me out

Thread Thread
 
elaziziyoussouf profile image
Elazizi Youssouf

please check Now, the demo example is working as expected ( look like the new react-hook-form have some breaking changes )

Collapse
 
elaziziyoussouf profile image
Elazizi Youssouf

Hmm, Yeah look like we have an issue with version 5.5.2 and we need to to register inputs using useEffect.

thank you for your help, will try to fix it ASAP