Member-only story

Sorry, I’m Not Diggin’ HTMX

Kenton de Jong
6 min readJan 6, 2024

HTMX === HTML Extended?

I know I’m one to always rain on somebody’s parade when it comes to emerging tech, but since I first heard of HTMX, I wasn’t a fan.

I think it has something to do with the fact that HTMX describes itself as “a library that allows you to access modern browser features directly from HTML, rather than using JavaScript” but the first step in using HTMX is to include a JavaScript library:

<script src="https://unpkg.com/htmx.org@1.9.10" integrity="sha384-D1Kt99CQMDuVetoL1lrYwg5t+9QdHe7NLX/SoJYkXDFfX37iInKRy5xLSi8nO7UC" crossorigin="anonymous"></script>
Sorry, come again?

What would have made me more impressed was if they used a language other than JavaScript to do it. For example, something like Blazor, which uses WebAssembly, or Brython, which while technically is still JavaScript, but is written with Python. I can appreciate out-of-the-box solutions, but claiming you’re not using JavaScript, while using JavaScript, made me wonder if this was some kind of joke about the ever growing number of JavaScript libraries.

Unfortunate spoiler: it is not.

But, that was enough to make me shrug off the idea of HTMX. However, I keep hearing about it, all over X…

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Kenton de Jong
Kenton de Jong

Written by Kenton de Jong

I am a web developer turned travel blogger that is forced to code to eat.

Responses (41)

What are your thoughts?

Also, if you use JavaScript for a backend, and the user has JavaScript disabled, your site doesn’t work. Backend languages like PHP, ASP.NET, Python, etc, don’t have that issue.

Well this is just wrong, isn't it? The backend runtime is not that of the client's, it is on some server, which won't be affected by whether someone has JS enabled or disabled.
I don't need to have PHP installed for your backend to run PHP, same with JS.

Htmx' point of not having to use JS is that the dev does not need to write it. I'm quite sure that you understood that. :)

I agree that many of htmx' motivations will lead to bad HTML. There's a reason why one should use button and a for letting…

but the first step in using HTMX is to include a JavaScript library:

stopped reading here, that sort of disingenuous irony tells me all I need to know about what's following... what do you think would've been a better alternative? creating a new markup and scripting language and forcing all browsers to migrate?

Recommended from Medium

Lists

See more recommendations