News for hackers. Stuff that matters.
Re:Htmx is part of the GitHub Accelerator by sibit on Wednesday August 16, 2023 @08:15AM (#37145860)
> poorly explains what it is

Seems clear to me but I've been watching this project grow for a few years now. If you read the brief introduction, motivation, and quick start on the homepage what do you think the project does?

> why would you want to use something like this

I would agree that part wasn't clear to me either, at least not right away. When compared to something like a SPA the state has to persist on the server while an ephemeral state exists on the client. With HTMX the state only needs to exist on the server. If this sounds like the MPAs of yesteryear, it is. You render the HTML using the frameworks/tools/languages you fancy. HTMX provides custom attributes you can use to update content within a page without having to reload the entire page.

Re:Htmx is part of the GitHub Accelerator by criddell on Wednesday August 16, 2023 @08:26AM (#37146006)
> With HTMX the state only needs to exist on the server.

Is this HATEOAS?

Re:Htmx is part of the GitHub Accelerator by sibit on Wednesday August 16, 2023 @08:37AM (#37146131)
I believe so. At least this is my understanding of HATEOAS.
Re:Htmx is part of the GitHub Accelerator by basique on Wednesday August 16, 2023 @11:04AM (#37148205)
Yeah. The author even has an essay about it: https://htmx.org/essays/hateoas/
Re:Htmx is part of the GitHub Accelerator by varispeed on Wednesday August 16, 2023 @01:57PM (#37150978)
> and quick start on the homepage what do you think the project does?

It adds some special attributes to HTML that magically perform some logic and it is not clear how and why. Why would I use something like this over React? What this thing is trying to solve?

> You render the HTML using the frameworks/tools/languages you fancy. HTMX provides custom attributes you can use to update content within a page without having to reload the entire page.

I still can't see what's the point of it. Why would I want to do it?

Re:Htmx is part of the GitHub Accelerator by sibit on Wednesday August 16, 2023 @02:22PM (#37151411)
> I still can't see what's the point of it. Why would I want to do it?

It depends on how you like to build projects. If you like the current state of client-side rendering there is no point to using HTMX. If you like server-side rendering (my personal preference) then HTMX fills the gap of doing partial DOM updates without needing to reload the entire page. Some people will argue about perf metrics until they're blue in the face. I mostly rely on personal preferences.

Re:Htmx is part of the GitHub Accelerator by varispeed on Friday August 18, 2023 @05:01AM (#37173013)
In the olden days I remember having backend returning an ID of the DOM element to update and a tiny function would look at it and update. There was no need for HTMX.