Hacker News new | ask | show | jobs
by satvikpendem 2035 days ago
But prepending with data can be annoying both from a "quickly reading" perspective, and an aesthetic one. The goal isn't to provide valid HTML necessarily but just allow the library to parse it correctly.
1 comments

How does writing invalid HTML help toward the goal of correct parsing exactly? To me it would seem to open up an infinite variety of edge cases that simply don't need to exist if you're working with 100% standard code.
That assumes that HTMX wants to be fully compliant HTML code, which, by the author's optionality on data- vs non data- attributes, does not seem to be the case. This then is basically like JSX, it looks like HTML but isn't really, just syntactic sugar over structure, presentation, and logic operations.