Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

htmx is a lower-level extension of HTML, with no server-side component to it

it tries to extend HTML as a hypermedia, which makes it more general (it can be used with any backend that produces HTML) but also more work to achieve things that, in live view, work magically



what sort of magic does LiveView do here that HTMx doesn't? seems like the difference here is that the article sends a server rendered partial HTML down the wire with HTMx sprinkled on it that gets rendered on the client side. From my basic understanding, LiveView sends HTML to client first, establishes bi-directional WS connection, and proceeds to send JSON data to the client and synchronizes the app state via sending diffs over WS.


yep, exactly, so LiveView needs to have that web socket doing diffs between the client and server side

htmx is just html++: any element can make any sort of HTTP request (GET, DELETE, etc.) based on any event and replace any other element in the DOM.

much simpler and "dumb" when compared w/ liveview, with no particular server-side implementation implied




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: