3 ms·
I'll counter this by saying making forums is my least favorite thing to do in React. Doing it by hand involves a ton of repetitive work. Each form input needs
by com2kid 7y ago
I'll counter this by saying making forums is my least favorite thing to do in React.
Doing it by hand involves a ton of repetitive work.
Each form input needs to have its input validated client side (immediate errors), needs to have error messages from server side validation, needs to be accessible, needs to work across all browsers, any sort of drop downs from an input need to have proper a z-index, and state, so much state to track.
Doing it in vanilla Redux just sucks, and it is super easy to completely kill performance. Behold the number is sites that have a non-trivial delay when typing individual characters into a form.
(I've seen input delays on sites approach 500ms per character!)
(Of course 90% of this goes away by letting the browser handle forms, and accepting page refresh on submit, but if you want to go SPA...)
One of my larger regrets from my last project is not just learning a form library, it would've saved me literally weeks of work.
Although that entire site is a worst case, it is 3 giant forms each with over a dozens inputs varying from plain text to numeric to date-time to an image uploader and gallery manager.
Basically the best case scenario for "I should've learned a 3rd party library".
- vga805 7y agoI don't think this is really a counter if you're talking about "3 giant forms each with over a dozens inputs." Yeah that sounds like a good use case to learn a library. I guess my larger point that might not have been emphasized well enough is that recommending using a form library for _any_ form seems misguided.