Login
You're viewing the mstdn.social public feed.
  • Jun 20, 2025, 12:29 PM

    @kevinrenskers just read your article on Django with alpine, bit of a weird comparison, you use a button to do a get request and then "fix" it with alpine by using an a tag, same later on with the search as you type, your htmx version has no form tag as a fallback while the alpine version does.

    💬 1🔄 0⭐ 0

Replies

  • Jun 20, 2025, 1:15 PM

    @hvdklauw As I said in the article:

    "Yes, you can make this htmx example work without JavaScript, but it’s not enforced, none of the official examples do so, and it results in a lot of added HTML attributes."

    This example comes straight from htmx itself, and yes you can make it work without javascript. The form tag would look like this:

    <form action="/search" hx-post="/search">.

    Same with the button/link situation, with htmx it would look like this:

    <a href="/contact/1/edit" hx-get="/contact/1/edit">.

    So lots of duplication, which Alpine AJAX doesn't suffer from.

    💬 0🔄 0⭐ 0
  • Jun 20, 2025, 1:16 PM

    @hvdklauw The focus is on the fact that a button with a GET request is not only possible with htmx, but the default way it's done. And Alpine AJAX goes the other direction and only enhances existing forms and links, so is by definition progressive enhancement.

    💬 0🔄 0⭐ 0