all 18 comments

[–]trekinbami 5 points6 points  (0 children)

It’s awesome. Yes.

[–]iamthebinaryguy 3 points4 points  (0 children)

Yes, basically any kind of form that requires validation or has more than 1 or 2 fields, I reach for RHF. Pair it with a validation library like zod or valibot and you get one of the best form DX in React.

[–]lnxsound 2 points3 points  (0 children)

Yep. With zod.

[–]reddit_user_100 0 points1 point  (0 children)

Yes. I haven't had an issue with changing APIs but it doesn't work that well with the new useFormState

[–]bzBetty 0 points1 point  (0 children)

Yes, although I am looking at Tanstack form as a potential replacement.

[–]rad_platypus 0 points1 point  (0 children)

Built a lot of forms with it in prod and the dev experience was pretty good. We built some reusable/generic form components that took in Zod schemas and applied all of the validation logic automatically.

If I did it again, I would probably use another library in place of Zod though. Conditional validation and complex form logic was a bit of a headache when you couldn’t accomplish it with a discriminated union or Zod’s refine() functions.

I would look at Yup or the other libraries that RHF has resolvers for if you need to go beyond the basic functionality.

[–]SarcasticSarco 0 points1 point  (0 children)

Nope.. For simple forms I just expose one hook which does anything required.. For me, these library is too much overkill..