Re:Form to DB
by throwaway60320 on Friday February 23, 2024 @11:05AM
(#39482328)
So the user would have to submit the form and be met with 10s of errors? I'd rather tell them immediately.
[ Parent
| on HN ]
Sure, and React is the best way to show a message in response to an input in a web form, right?
Let me tell you some news, they just launched an integration of this new HTML <form> thing with javascript, so you can have JS listening to inputs and displaying information anywhere on the page. Cool, isn't it?
Ah, but the sad part, again, is you don't get to download an unnecessary library for that. It comes baked and activated into all browsers by default. It doesn't make your resume shine, either...
Re:Form to DB
by throwaway60320 on Friday February 23, 2024 @01:50PM
(#39484629)
(P)React is the best way to do it in a maintainable, easy-to-reuse, easy-to-understand, extendable fashion, indeed. Show me something better and I'll jump on it.
I don't care about resumes, I own my consultancy. I care about quickly solving business problems for my clients, not making new problems in the process, and reusing the solutions. I am not paid hourly, I don't make money from fixing spaghetti code broken by adding a stateful form control elsewhere.
Re:Form to DB
by endofreach on Friday February 23, 2024 @05:02PM
(#39486690)
Just saying: You can do input validation without JS using the pattern attribute.