2 ms·
I like the Vue/React/Svelte model of the DOM being a function of the data. For example, in a shopping cart, I add two chocolates, the number against the chocola
by aitchnyu 2mo ago
I like the Vue/React/Svelte model of the DOM being a function of the data. For example, in a shopping cart, I add two chocolates, the number against the chocolate, the count at top and a banner encouraging me to reach X total all center around a data structure.
I use Django Ninja, Zod, InertiaJS+Vue and its as easy as using Django's templating engine, but static typing ensures my view doesnt emit unrepresentable data, my TS doesnt accept unrepresentable data, Vue+TS dont allow logic errors in template. AI makes it effortless. Again, the loaded page is a function of the data supplied at the view.
With HTMX, I'm writing several server-side functions to mutate the DOM imperatively and using HTML attributes to call them. Its great for forms but that shopping cart example needs code scattered across multiple functions and templates.
- MrBuddyCasino 2mo agoYes I don’t see the appeal of HTMX in most cases. Vuejs has less footguns than React, and LLMs can produce it decently well to at least get started and then refactor.
- llbbdd 2mo agoThe appeal is that it's not React, aimed mostly st people who have a grievance against React for one ill-informed reason or another. In time it will either become React by another name or die out.
- mikestorrent 2mo ago> Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
- llbbdd 2mo agoAbsolutely. Show me the source of a sufficiently complex web application that isn't built on React, and I'll find the React-by-any-other-name inside.
- MrBuddyCasino 2mo agoLook at the average React site in the wild, and notice that it is dog slow due to the various performance bugs it exhibits. Apparently nobody can get it right.
- llbbdd 2mo agoThere are very many highlight performant sites built on React, and very many sites that are homespun or built on other frameworks that perform badly. It's a scapegoat.
- mikestorrent 2mo agoThe appeal is literally a "fuck you" to anyone that makes me have to run a build process for a web page, when I used to just be able to click reload and see the reality in front of me in seconds on a machine 1/500th the speed.
- blovescoffee 2mo agoYou can drop react into an html page with a script tag. You don't need a build step. The build step is only requisite if you'd like the full benefits of react, which personally I find worth it. Cached builds are quite fast. All build steps/compilers/etc. exist to add some devex upgrade on top of some lighter-weight thing that many devs find useful.
- wild_egg 2mo ago> With HTMX, I'm writing several server-side functions to mutate the DOM imperatively and using HTML attributes to call them. Its great for forms but that shopping cart example needs code scattered across multiple functions and templates. That's a weird way to use htmx. I've built a number of large apps with htmx over the last few years and never done this. Seems a great way to have a bad time.