13 comments

  • snorremd 1 hour ago
    I think HTMX is a great fit for forum software. Forum websites mostly deliver non-interactive content in the form of text and maybe some audio, video, or image content. All of this can be represented as HTML and CSS.

    With HTMX you can do partial rendering and live updates via server-sent events. This gets you most of the way to the "client side" feel where things load dynamically based on user actions.

    The only properly dynamic SPA-like feature in a forum I can think of is a WYSIWYG editor, but that you can build as a web component. Maybe a flexible highlight and quote system would be a bit difficult in pure HTMX (think of the comment functionality in Medium posts). So you'd want to build a few things in client side JS. But the main experience could very well be built with HTMX.

    • epolanski 14 minutes ago
      > The only properly dynamic SPA-like feature in a forum I can think of is a WYSIWYG editor, but that you can build as a web component. Maybe a flexible highlight and quote system would be a bit difficult in pure HTMX (think of the comment functionality in Medium posts). So you'd want to build a few things in client side JS. But the main experience could very well be built with HTMX.

      That's how interactivity has always worked.

      Server-side render everything + ship interactivity via js on top of it.

      I feel like most of the web developers forgot that React/Vue/etc solve a specific problem: single-page application.

      This is a very narrow and specific problem: navigating from page to page not causing full page reloads.

      But the web has changed since SPAs were needed in major ways:

      1. the average device and connection is insanely faster than 10-15 years ago. Receiving and rendering content is not the problem it once was in the age of 2g connections and limited hardware mobile devices. Even the very low end phone from few years ago has nowadays 0 problems loading and parsing few hundred kbs of html and js.

      2. Web technologies moved at all levels. Server technologies, cloud ones, browser ones. React and company are solving problems that barely belong to the modern web.

      In short: today you can have an app-like, spa-like experience even out of fully server-side rendered applications. While also benefitting from shipping much less code to the client.

      There's a very minimal amount of websites and applications out there that benefit, and aren't crippled by these rendering libraries: those that vastly leverage offline capabilities of the platform and want to keep working regardless of internet being available. I'm talking the notions and linears.

      But bar from those, still working with this React slop is just not good for the user. Even multi billion companies hiring leetcode ninjas can't get acceptable user experience and performance out of those libraries, and it's not a coincidence: they keep forcing the wrong tool for the wrong problem.

      They keep living in 2018 and at the end of the day the only excuse for those react/angular+tailwind slop is that there's an entire generation of developers that doesn't know anything else and has long lost any proper engineering skill (if there is any) in finding the right tool for the problem. This is a familiarity issue, not sound technical decisions. It's the "you can't go wrong with oracle/mysql/ibm", but actually you can, and it shows.

      What's worse: it's incredibly cheap to experiment different solutions and approaches via LLMs in 2026, but people keep slopping the same monstrosities.

  • prologic 1 hour ago
    I basically use HTMX for all my Web Apps, including PWA(s) that run as ~near native apps on iOS/Android. It's great! I aso pair this with DaisyUI+TailwindCSS. YOu really can't go wrong, there is something quite pleasant about writing your web apps in ordinary HTML with partials and the extensions that HTMX adds to the browser for SPA-like interactivity.
  • sgt 2 hours ago
    Happy they did this. Htmx is a great fit for server rendering - which in many or most cases is what you should do in any case. You can always put a mini VueJS or ReactJS app inside of a template for a very custom interactivity.
    • skeptic_ai 1 hour ago
      That’s basically a massive hack. Every real world app will need enough js that htmx will require you to put js on front end and you’ll need to hack it together. Just like we did php+js 15 years ago.
      • prologic 1 hour ago
        I've found this to not be true at all. You can do quite a lot with just HTMX. Any client-side Javascript™ you strictly need can often be done fairly minimally with Locality of Behaviour (LoB).
        • asdfsa32 43 minutes ago
          LoB isn't going to reconcile Chat Messages rendering state and Notifications. Their dependent state by nature. HTMX largely seems to ignore this reality.

          In fact, the complexity of Chat Messages and Notifications synchronisation is one of the prime reasons why React exists.

          • Zanfa 15 minutes ago
            > In fact, the complexity of Chat Messages and Notifications synchronisation is one of the prime reasons why React exists.

            Which makes it even more ironic that in the 10 years since React was announced in 2013 and when I quit Facebook, they never managed to fix the original state synchronization bug that they demonstrated in the original React announcement for more than a few months at a time at best.

            I'm sure technically it wasn't a singular bug over the years and the causes were complex, but React did fuck all in relation to the unread message counter being correct.

          • prologic 26 minutes ago
            Sorry, but I hate ot say it, but you are very wrong. I have built an entire Instant Messaging Apps and Slack/Discord aps this way, complete with notifications, state changes and full e2e encryption.
          • greenchair 36 minutes ago
            right, so use the right tool for the job. most apps are boring CRUD apps and dont support chat.
      • Levitz 30 minutes ago
        That "massive hack" is supposed to be one of the core features of React.
      • asdfsa32 1 hour ago
        But it is different this time, we are going back to HTML! /s
    • asdfsa32 2 hours ago
      Putting ReactJS or VueJS for a little interactivity is hardly the correct approach. It makes no sense to bring them in for "a little". What made React and React-like (Angular v2, Vue.js) frameworks stabilise is that they're about the right abstractions and everything else for managing dynamic html converges to about the same thing.
      • sgt 1 hour ago
        In principle I agree that putting React or Vue in for a little interactivity is a bad approach, if the same can be achieved with Htmx, which it usually can.

        However for some really complex mini apps, that's another story. But for the rest of those CRUD pages, you can go simple server side rendered.

        • asdfsa32 1 hour ago
          "Complex mini app" is one hell of a concept.
          • skydhash 1 hour ago
            It can be. Think something like a file viewer or a text editor, or a music players. You can probably make do with vanilla javascript, but there’s some threshold where using react to take care of the state<=>ui relationship is worth it.
            • asdfsa32 1 hour ago
              A text editor or music player is hardly "mini".

              Again, the issue with htmx is that it pretends like it is not a framework, when in fact, it is just a second attempt at angular 1.0, with even more naive assumptions about web apps.

              • stymaar 34 minutes ago
                > A text editor or music player is hardly "mini".

                If it's a sub-function of a bigger ensemble that mostly dies something else then it's fine to call them “mini apps”.

                For instance a bank app may contain a text editor for the internal messaging feature of the app, that would count as a min-app in that context.

  • thrownaway561 38 minutes ago
    This happened 3 years ago... wondering what makes it news worthy today?
    • butz 9 minutes ago
      We need a follow up, how this change panned out, how much did performance improve?
  • Ralfp 2 hours ago
  • leviyi 47 minutes ago
    [flagged]
  • asdfsa32 2 hours ago
    Great, now you can't offload your FE to a CDN.

    But on serious note, htmx is basically a solution in the search of a problem. It is the new hype.

    Or rather, a solution that overlooks 2 decades of learnings. Yes, for a small set of projects htmx is okay, but even then, where htmx is ideal, static is king, and once static is not good enough, htmx sooner or later starts to feel like the XAML and BPEL soap.

    The fundamental problem is that it is pretending to be a declarative language while entirely imperative.

    • xutopia 1 hour ago
      Sounds like you never worked on complex HTMX systems. They're easier to maintain, allow for easy caching of HTML fragments in a page. For higher traffic pages React just fails spectacularly.
      • asdfsa32 1 hour ago
        How does React fail for high traffic pages? It is amazing that you would suggest I don't understand HTMX "systems" and then go make such assertion.

        I have been writing frontends since early 2000. So I have seen it all, from activex being shinny to jquery, mootools, backbonejs, angular 1.0, php, Java Spring, Go. I looked into htmx and it is very much a second attempt at angular 1.0, which I did use for some good half decade as that was the best option at the time, but sooner or later, you get sick of stuffing "little codelets" inside attributes all over the place, which is exactly what htmx does.

        If you want to understand what htmx is going to look like at scale, look at angular 1.0 projects.

        • xutopia 41 minutes ago
          Angular being basically the same HTMX is nonsense and you should know better.

          Say you have a huge Google Ads budget burning up on those landing pages. Make one version with React and one with HTMX. Open Lighthouse and see performance difference. First page renders are much slower with React. Page load is slower and this makes a huge difference in mainland USA where people are still on 3G speeds on their budget phones.

          "High traffic" might be the simplified view here and it took me a few page memos to explain it to my lead but the gist is that React is slower, takes longer to load and most of what it is used for is easily done with plain HTML and sprinkles of JS as needed. Unless you're streaming sound or video like you do on Facebook pages it's really not the right tool for the job in a majority of cases.

          • asdfsa32 14 minutes ago
            The only nonsense here is ignoring that React.hydrate have existed since React 0.4 (2013, that is over 13 years ago) and Gatsbyjs was released over a decade ago around 2015.

            The gist of it continuously seems to be that people who think HTMX Great, know very little about good frontend engineering.

        • wild_egg 1 hour ago
          As someone who wrote a lot of angular back in the day, and who writes a lot of htmx in the current day... That comparison makes absolutely no sense.

          The only thing the 2 have in common is the use of HTML attributes for functionality. Completely different on every other axis that matters.

          • asdfsa32 1 hour ago
            It is different in that some of what happened on the frontend now happens in the backend, but overall, it is the exact same approach, so as I said in a sibling comment, it, it is just a second attempt at angular 1.0 with even more naive assumptions about web.
        • officialchicken 1 hour ago
          Being a curmudgeon is not good engineering leadership. "Seeing everything" is just old people being wistful, not actually contributing or doing in the now. I deployed (via ftp) my first site before Netscape so I do understand where you're coming. There isn't at present a valid or detailed criticism of why X won't Y based on all of that supposed XP - so why mention it? Educate us - why will it fail? Is it because you never mastered CDN's or the exact opposite? It certainly doesn't lead any credibility the assertion that A will become Z because they look similar or embrace similar ethos.
          • asdfsa32 1 hour ago
            You need to read things in the context, Chicken.

            But I will answer your main questions since your comment seems to be in good faith.

            Just like angular 1 choked on complex, high-frequency UIs, HTMX is going to follow the same faith. Github uses a similar approach to HTMX and you will find that even for such a simple system, their notification indicator elements on the same page are often out of sync.

            The reasons for this is that State Management is hard, which is why the reconciliation loop of React-like frameworks and shadow-dom does away with pushing complex state management to user application and handles it systematically.

            Of course, this doesn't mean htmx is useless, for a specific case of web apps, it is good enough, but the problem is that often times, you start with "specific cases" and your application grows overtime.

            So when you consider that and the cost of doing htmx vs React or any react-like framework, picking htmx is only reasonable if it is the only option you're comfortable with and rarely on merit.

      • ifwinterco 1 hour ago
        Why would react fail for higher traffic pages?

        If it's a traditional React SPA, you can use a versioned bundle with immutable caching and each user only has to download your bundle when you release an update or they use a new browser. You will need to think about how you handle spikes in traffic when you do a release, but even then users won't all load your page immediately after you bump the version.

        Most of the time (existing user using the same browser, no update) there will be precisely zero traffic to your servers to load the React app except for the initial HTML skeleton.

        For an app using SSR it's more complicated and I'll admit I don't know how that works at very high load

        • xutopia 46 minutes ago
          I had landing pages using React on a 1.6M/m budget. The loading times on cell phones in mainland USA meant we had people cancelling the loading of pages. When we converted to straight up cached HTML we saw a huge increase in full page loads.

          People weren't cancelling the page load and surfing back anymore. You cannot argue that React is extremely heavy and also adds a lot of time between first render. Test a normal HTMX page in Lighthouse and then convert it to React and you'll see how drastic things are.

          People use React today out of habit rather than because it's the best tool for the job.

          • asdfsa32 39 minutes ago
            This just shows that despite the 1.6M/m budget, you did not have people who could do react correctly. React.hydrate have existed since React 0.4 (2013, that is over 13 years ago) and Gatsbyjs was released over a decade ago around 2015.

            But while first render is of course important, now everything else is more expensive with htmx because you have to generate HTML on the server, on top of your usual fetch pipeline. Yes, for small traffic it makes little difference, but once you have >10k/s requests, things start to cost.

            • xutopia 28 minutes ago
              Yes but why bother with React, Hydrating pages at all if you can do something simpler? What advantages does React provide here?

              HTMX tools are simpler while providing straightforward thinking around html fragment caching, whole page caching. React just gives a runaround way of doing everything. I'll remind you React was built so that people could continue watching a streamed video while they navigated on a page. Most pages aren't streaming anything.

          • shooly 14 minutes ago
            > loading times

            What does React have to do with loading times of a page? React does not contribute to that at all other than having to download the JS runtime, which with Preact is 3KB.

            > You cannot argue that React is extremely heavy and also adds a lot of time between first render

            Yes you can! In no world would React itself add enough render time to make people navigate back, even if running on a computer from the 90s!

    • bcrosby95 1 hour ago
      For what it's worth, your last statement is why react always felt off to me.
    • dajonker 1 hour ago
      This feels like an uninformed, generalized opinion from someone with zero experience on the topic. Have you even used HTMX or a similar approach?

      Besides the memes, it is absolutely not hype-driven, but hypermedia driven. It asks the question: could HTML be even more powerful than it already is?

      The creators of HTMX even want to standardize core ideas of HTMX into the official HTML specification: https://triptychproject.org/ Please read this and reply when you still think it's hype.

      • asdfsa32 1 hour ago
        I have been writing frontends since early 2000. So I have seen it all, from activex being shinny to jquery, mootools, backbonejs, angular 1.0, php, Java Spring, Go.

        Hypermedia is what to web apps what XML is to programming languages. We have tried HTMX as a concept many times over, there is nothing new here, and like everything declarative, sooner or later it will fall short and you're going to reach for escape hatches and what not.

        And the features specified in that project is nice to have, in the same way that it is nice that we have Date Pickers or other advanced input features, but it is never going to replace React-like frameworks.

        Again, the reason we have finally stabilised on JSX is because you can't really "Declare" away HTML or sophisticated data and event management, Google really really tried that with Angular 1.0, and we know it doesn't scale.

        • monooso 53 minutes ago
          > Hypermedia is what to web apps what XML is to programming languages.

          I have no idea what this means. The World Wide Web itself is quite literally hypermedia.

          The fact that a lot of front-end frameworks appear hell bent on ignoring this fact doesn't make it any less true.

          > Again, the reason we have finally stabilised on JSX is because you can't really "Declare" away HTML or sophisticated data and event management...

          You may have stabilised on JSX, "we" have not. React is one way of building web applications. It's appropriate for a certain subset of highly interactive SPAs, and completely inappropriate for many other things.

          • asdfsa32 27 minutes ago
            > You may have stabilised on JSX, "we" have not. React is one way of building web applications. It's appropriate for a certain subset of highly interactive SPAs, and completely inappropriate for many other things.

            Just about any reputable sources puts the combined market share of React, Vue, Angular 2+, and Solid well above 80%.

            So I am not sure what "we" you are talking about.

            • asdfsa32 10 minutes ago
              This is ignoring the React Native and Flutter prominence on App Stores as well.
  • mmmmbbbhb 1 hour ago
    "JavaScript ... *squints*... library?" What's that, a thing my llm uses for websites? Ok. *closes thread*