author, Laurence Isla,. This how-to shows a way to return HTML content and use the htmx library to handle the AJAX requests. Htmx expects an HTML response and uses it to replace an element inside the DOM (see the htmx introduction in the docs). Preparatory Configuration: We will make a to-do app ...
Yes, and that’s what is shown in this article.
htmx is not meant to do anything fancy that you can’t do with Ember/Angular/React/Vue/etc.
htmx is simpler though and has a few benefits as I see it, compared to those frameworks:
No duplication of data models and routing, and all business logic stays on the server-side where it belongs.
No build step, no dependency hell, and no outrageous churn; just include one JS file that browsers should be able to run indefinitely.