Get the latest tech news

Building a single-page app with Htmx


People talk about htmx as though it's saving the web from single-page apps. Well, I guess I missed the memo, because I used htmx to build a single-page app.

It triggers a GET request to/todos/${id}/update every time it’s checked or unchecked, with a query string done matching its current state; htmx swaps the full response into the<body>. On the other hand, the client-server story in a framework like React can be painful, requiring careful coordination between clients and servers via an awkward data exchange channel. There are other tools like MavoMavo: A new, approachable way to create Web applicationsmavo.io that explicitly focus on this use case, and indeed you can see that the Mavo implementation of TodoMVCTo-Do Listmavo.io/demos/todo/ is far simpler than what I’ve built here.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of htmx

htmx

Photo of page app

page app

Related news:

News photo

Show HN: htmgo - build simple and scalable systems with golang + htmx

News photo

Htmx, Raku and Pico CSS

News photo

Htmx does not play well with content security policy