DEV Community

Discussion on: Handling Forms in ReactJS the right way

moinax profile image
Jérôme Poskin • Edited on

In the second example you forgot to rename your handlers to handleChange. This could be confusing for newbies.
Anyway it's a good start, but as some others told you, you should rely on form libraries. I tested a lot of them and I kind of like final-form for building big forms and reusable fields, then I would recommend you Yup for the validation. The latter is working pretty well with any form library by the way.

dikamilo profile image

Formik + Yup is very good combo.

moinax profile image
Jérôme Poskin

Yes I used Formik before but got issues with null values and complex forms. I didn't encountered any of those issues with final-form which I'm using in production for a year now

fazer1929 profile image
Abhishek Agrawal Author

Thanks for pointing it out, I've updated it.
I totally agree that third party libraries are excellent way of handling React forms.
I just found about this way and thought it was pretty neat.