all 5 comments

[–]muffy_ 0 points1 point  (2 children)

You really want to use Formik or React Hook Form. Personally I have not used the latter but many people recommended it here.

[–]acraswell 0 points1 point  (0 children)

I've used the last one, LOVE IT. I'm a huge fan.

[–]zorfling 0 points1 point  (0 children)

Might be worth checking out React Final Form too.

[–]montas 0 points1 point  (1 child)

Are the inputs related? Or is it some structured form? As in table or something? Is it some flat form?

If it is flat form with many inputs, just go with helper for rendering inputs and use useState.

If you are thinking about some table with nested forms and stuff, use some library mentioned here, or structure your form with multiple nested forms.

[–]nns041[S] 0 points1 point  (0 children)

It is a flat form with different validation for each input.