4 ms·
It was an experimental project, so we were allowed to go a bit wild with the whole thing and see what we came up with. Htmx really changed the whole dev experie
by withinboredom 4y ago
It was an experimental project, so we were allowed to go a bit wild with the whole thing and see what we came up with. Htmx really changed the whole dev experience from the ground up.
First, there was no duplication of validation, or business logic on forms between the front end and back end. Everything was written in one language (with the exception of HTML + CSS).
Second, the ability to send updates out-of-band was amazing. A user selecting a change on a form and updating a preview felt instant when compared to the same thing in React.
Third, no crazy hooks or weird keeping state between the view and the data we sent. We just used plain html and inputs to store the state along with CSRF tokens.
My only issue was that the browser didn’t validate the form before submission. So email inputs weren’t validated. I don’t know if that’s an htmx bug or expected behavior, but it was annoying.
- recursivedoubts 4y agohtmx should perform HTML5 validations forms on submit events, but other elements can turn on validation via the hx-validate attribute: https://htmx.org/attributes/hx-validate/ https://htmx.org/attributes/hx-validate/