logoalt Hacker News

preommryesterday at 7:38 PM1 replyview on HN

Ok, this article is basically about htmx, and htmx style web dev rather than being about front-end dev as a whole.

I get why people like it, and I think it might even have it's place as a niche, but my main problem is that it's an awkward middle ground. If we say component based frameworks (react, vue, svelte) are too heavy, then we can still go a step further and say that htmx isn't necessary for a lot of plain static sites that need some reactivity.

Vanilla js with fetch, getElementById, innerText, is 99% of what people need for these types of simple sites.


Replies

TacticalCoderyesterday at 8:39 PM

> Vanilla js with fetch, getElementById, innerText, is 99% of what people need for these types of simple sites.

But it's not only for simple sites. Don't underestimate the power of, say, a SSE stream using brotli compression: this can stream a shitload of data for serious apps (like real-time financial data).

Resource usage on the client-side is also close to nil with a SSE stream and minimal JavaScript and on the server-side it hardly changes anything: that data was going to be sent to the front-end one way or another anyway.

And if you take something like DOM morphing and, say, Datastar: it's not conceptually that different from React. The DOM reconciliation doesn't happen at the same place and not in exactly the same manner, but it's not entirely dissimilar IMO.

It's not just htmx: there's are different projects and, interestingly IMO, developers from many different languages who are now beginning to tackle this problem of Javascript (way too) heavy frameworks.

I think it's a bit early to say this is a niche.

show 1 reply