Live data from Hacker News

Is htmx Just Another JavaScript Framework?

htmx.org

1–10 of 318 posts

Re: Is htmx Just Another JavaScript Framework?

#6
I like this fuzzy definition better than "your code calls a library; a framework calls your code."

The sweet spot for HTMX I've found involves liberally using the hx-boost attribute enhance links and forms that already work without JavaScript. You definitely sacrifice some of the expressivity of HTMX, but you also get a website that is much less coupled to the (library|framework).

Re: Is htmx Just Another JavaScript Framework?

#8
>But you can write React in this library-like manner too and nobody argues that React isn’t a framework.

>React - The library for web and native user interfaces

https://react.dev/

https://www.reddit.com/r/reactjs/comments/126uzfo/why_is_rea...

https://medium.com/@Angie.O/why-react-is-a-library-and-not-a...

https://www.oreilly.com/library/view/what-react-is/978149199...

Re: Is htmx Just Another JavaScript Framework?

#9
Sounds like a similar argument outlined here in a framework-agnostic way:

https://blog.jim-nielsen.com/2023/html-web-components/

I don't really understand why people would bother arguing whether htmx is a library or a framework. It's a way of making a web site where you write less JS.

Re: Is htmx Just Another JavaScript Framework?

#10
It is not the same at all. Of course it needs javascript on the back to work.

But the concept is totally different. It uses a hypermedia declarative model, an extended POST/GET etc. model. It keeps things very simple compared to a framework like React where you need a package manager, a transpiler and a json backend for data (not returning hypermedia).

So I would not consider it another Javascript frontend framework at all. I would consider it more like original html with extensions that support Ajax respecting the original web model.

Post reply on HN