DEV Community

Discussion on: Abstractions in React and how we are building forms

Collapse
 
abumostafa profile image
Ahmed Abumostafa • Edited

Thanks for the amazing article. I built a similar library to manage forms on my own which is more or less the same concept (Form, Field, etc) and works fine. The only issue I faced was related to image uploader with thumbnail because onSubmit it updates the state and it re-renders the fields again and images were flickering.

I will give formik a try, probably it will solve my problem.

Collapse
 
akirautio profile image
Aki Rautio

Thanks :)

I have been using and trying a punch of different form packages and for me Formik has worked the best so far.

Collapse
 
musthashman profile image
mustHASHman

If you want to prevent re-endering use refs. That's what React Hook Form does. When you call useForm it's actually returning _formControl.current which is ref object that contains all the stuff you normally destructure from useForm.