Calmcode - htmx: one final point

One final point

1 2 3 4 5 6 7

HTMX is a tool that makes it easy to send requests from HTML and then to return more HTML from any backend that you like. And I might argue that HTMX in that sense gives you a lot of freedom. If you don't want to write JavaScript, you don't necessarily have to.

However, there's one small point that I do wanna make. It is a great feeling that we are perhaps no longer forced to use JavaScript, but it might be too extreme to say people shouldn't use JavaScript ever anymore.

The simplest example is the codeblock below.

print('copy me')

This codeblock element has a copy to clipboard element attached. This is great! It adds just enough interactivity to make the website more useful. But it's also a bit of JavaScript. And that's okay.

Again. The cool thing about HTMX is that you can choose when you want to write Javascript and when you prefer to use the backend language of your choice. It's a great tool to have in your toolbox, because it lets you write the JavaScript that you want to write, not the JavaScript that you have to write.