News for hackers. Stuff that matters.
Re:Things I wish I knew about state management when I starte... by veeralpatel979 on Monday February 10, 2020 @05:00PM (#22293860)
> form libraries remain the one thing I've never really seen a need for

I felt this way too, until I used Ant Design's form component (which uses rc-form under the hood).

Form libraries take care of validation for you, allow you to specify an initialValues prop, and give you a handleFinish={values => ...} prop so it's easy to run your own API call when the user clicks "Submit".

Plus, Formik lets you model the form values using a TypeScript interface which I like.

To me, Formik provides several advantages over not using a form library, and no disadvantages except a small learning curve, so that's why I recommend it.

There are no comments on this comment yet.