• PenguinCoder@beehaw.orgOP
    link
    fedilink
    English
    arrow-up
    6
    ·
    11 months ago

    That’s AJAX

    Yes, and that’s what is shown in this article.

    … return HTML content and use the htmx library to handle the AJAX requests

    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.

    • AlmightyTritan@beehaw.org
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      I feel like most of the things such as dependency hell and at least some amount of data models and routing can be resolved by using custom elements tho. I can agree to a certain point that HTMX could lead to a simple markup based approach, but it’s still a matter of learning another library and all that junk. In a perfect world I feel like there should just be an equivalent to maybe the `` element that could on becoming visible makes an Http call to lazy load and plop in some inner HTML. I guess you’d still be missing the whole events driven by attributes part tho.

      I don’t know if I think this whole HTMX stuff is silly cause I’m jaded, or don’t see a use case for it personally. So take my comment with a huge grain of salt.