Hmpl.js: Template language for fetching HTML from API

1 year ago (hmpljs.github.io)

…so just [jQuery.load](https://api.jquery.com/load/) with some verbose templating? My 2000s-era developer self is so triggered. Please can we not go back to DHTML / AJAX?

Snark aside, while I disagree with the premise I applaud your thinking out how to shoehorn fetch into a template language.

HTML/Javascript need a lot of work to make it usable again, so I love seeing attempts at fixing pain points like this.

That said, even after reading the Why HMPL section, I don't see why I would use this? I mean, the examples look like verbose, complicated alternatives of what HTMX does much more concisely and without me writing javascript.

Bravo on getting the project here though! That's an accomplishment!

  • My first thought was this is trying to be htmx as well, but upon reading the readme this project appears to convert the html it has retrieved from the API into a DOM object using the hmpl.compile() function. Could I do that with htmx?