3 ms·
This is why I never understood htmx. Vanilla react is pretty easy to get started with, you just create a root component and mount it to a DOM element. Maybe 10
by CooCooCaCha 1y ago
This is why I never understood htmx. Vanilla react is pretty easy to get started with, you just create a root component and mount it to a DOM element.
Maybe 10 lines of code.
Then you can go as simple or as complex as you want without having to awkwardly rig it up to another UI system.
- mixmastamyk 1y agoHtmx (re)uses html and doesn’t require learning a new paradigm or loading heavyweight libs.
- troupo 1y agoExcept it requires learning a bunch of new paradigms including a full on custom DSL, and requires loading a library that is that is at best as heavy as most competition
- mixmastamyk 1y agoNot at all, simple things are simple.
- troupo 1y agoSimple things are simple everywhere. And then suddenly you need to be aware of the quirks: https://htmx.org/quirks/ https://htmx.org/quirks/ And then you need your backend to handle all the weird new headers: https://htmx.org/reference/#request_headers https://htmx.org/reference/#request_headers And then you need to learn completely non-HTML things like "attribute inheritance" https://htmx.org/docs/#inheritance https://htmx.org/docs/#inheritance And then you need to learn a whole new DSL https://htmx.org/docs/#trigger-modifiers https://htmx.org/docs/#trigger-modifiers HTMX probably has more concepts than react at this point in time.
- mixmastamyk 1y agoThese examples are trivial and/or rare, especially in comparison to the monstrosity of a SPA framework. I picked up htmx in an hour or two. I do think it is a bit overengineered however, though there are other implementations of the idea.
- troupo 1y ago> comparison to the monstrosity of a SPA What you call "monstrosity" is just as trivial and rare. See how this works? You claimed that HTMX doesn't require learning new paradigms. When it's actually a new paradigm replete with multiple different requirements, custom DSLs, new behaviors etc.
- mixmastamyk 1y agoIt uses html’s paradigm, which is a masterstroke. You keep using the term DSL as if it’s appreciably different than “put a string in an attribute.” Htmx is an order of magnitude easier to get started with for a person who already knows html, ask me how I know.
- CooCooCaCha 1y agoYou don’t have to use an SPA framework. Hopefully you don’t think you need one to use react.