"For example, when building complex forms with dynamic validation and conditional fields, we found ourselves writing convoluted server-side logic to handle what would be straightforward client-side operations in React."
Anakin Padme meme: "You still implement validation on the server-side as well, right.... right?"
If your web form is more complex than a paper form, maybe rethink the former? I can not think of a form that can be implemented easily in react, but is difficult in Htmx other than wishing to plug in a React-like global application state and having the job 90% done as libraries.
I just looked at this iPhone alarm clock on Gum Road, which I also read about on HN. The page describing the clock is janky. Slowly scroll down the page (with a track pad) and it will jump up and down erratically as you get past the "Add to Cart" button. Hover your mouse in one vertical position on the page and it will turn the header on and off over and over again.
It looks like the sticky header with "Add to cart" disappears when the large "add to cart" button scrolls into view, and reappears when that disappears.
> Plus in most cases showing error messages too fast is terrible UX.
The solution to that problem is to debounce or throttle your error messages. That allows you to report validation issues to the user quickly, but not overwhelmingly fast, before sending a network request potentially across the Earth and back.
Showing error messages on the client side is not too fast or bad UX. Let's say someone entered an invalid credit card. Or an invalid email. Why even let that touch the backend?
Note that frontend forms libraries allow a lot of choice over when to show error messages.
Validating in multiple places doesn't mean 2x the code. You can validate on both the client and the server using the same code. One of the charms of server-side JS.
Those charms can turn tiresome rather quickly once you discover those server-side JS libraries you're popping like candies are adding bloat and security vulnerabilities once they're shipped to the client side.
Anakin Padme meme: "You still implement validation on the server-side as well, right.... right?"