▲ | threatofrain 3 days ago | ||||||||||||||||
You only use the popular React form libraries when you want utmost control over your forms. Like as you type into a registration form you check off boxes for password requirements, and you only show errors after they’ve touched it once. Otherwise vanilla forms are great in React. If you did this by hand in Vue or vanilla it would also be hell. Also in terms of maintenance burden the top libraries in this space are massively popular. Most here would likely be making a great maintenance burden decision in offloading to well reputed teams and processes rather than in housing your own form and validation library. | |||||||||||||||||
▲ | brokegrammer 3 days ago | parent | next [-] | ||||||||||||||||
Sure, I could build forms with React only but I found controlled forms to have less performance when there are many fields. react-hook-forms uses uncontrolled forms with refs which has near native performance, so if I had to build that by hand it would be more tedious. AI makes this process easier, but it's still extra code that needs to be maintained and tested, when you can do the same for free if you stick with standard web tools. | |||||||||||||||||
▲ | jollyllama 2 days ago | parent | prev | next [-] | ||||||||||||||||
> If you did this by hand in Vue or vanilla it would also be hell. It's really not. If you walk away from your project for 7 years, your vanilla JS will just load into the web browser and still behave the same. If you walk away from your React (or other NPM-based project) for the same amount of time, you won't be able to build all your dependencies from source without spending time updating everything. Going with something like HTMX or plain JS vastly reduces your maintenance overhead. | |||||||||||||||||
| |||||||||||||||||
▲ | a_subsystem 2 days ago | parent | prev [-] | ||||||||||||||||
>>> check off boxes for password requirements, and you only show errors after they’ve touched it once I don’t get it. This is super easy w htmx. |