6
votes
What libraries do you use for implementing web forms, if any?
I recently ran across Modular Forms, which is a new and rather obscure JavaScript library for doing form validation that claims good support for TypeScript (type safety) and low download size. It has variants for a few frameworks like React and Preact.
I’m wondering what else people use? I ended up writing my own Preact hooks to help out, with the actual validation done using Zod.
In react projects I use react-hook-form with zod validation. I used to always reach for formik but react-hook-form is simpler, does what I need it to, and is fairly light weight. It works really nicely with shadcn/ui too.
For angular (corporate clients) we just use the built in reactive form stuff.
I’ll second react-hook-form, I haven’t used it much yet, but one of my coworkers recently did some refactoring to use it - seems much simpler than our prior solution
Angular has very good form-validation built-in that's easily customized with Validators.