{
  "id": 2613252,
  "title": "Htmx live is cool. Datastar is fast. This cow is raw and strong",
  "url": "https://urgent.news/2026/08/22/htmx-live-is-cool-datastar-is-fast-this-cow-is-raw-and-strong",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-22T17:01:25.000Z",
  "source": {
    "name": "Hacker News",
    "slug": "hacker-news",
    "url": "https://stario.dev/ox"
  },
  "original_language": "en",
  "account": "In the world of web development, Htmx live offers a unique approach to building interactive web pages. The key principle is to add server functionality only when necessary, using the attribute \"moo=\". This clever attribute allows for reactivity without transforming the entire page into a separate application.\n\nWith Htmx live, complete JavaScript code can be written directly within the HTML, alongside the elements it impacts. The \"ox\" object provides access to expressions that include the el (element), st (state), evt (event), and ox (ox object) variables. This eliminates the need for a separate template or directive language.\n\nOne of the standout features of Htmx live is its ability to keep the page state in sync with the server. Effects automatically track the values being read, and ordinary object or array updates only affect the expressions that depend on them. This means that local interactions can remain within the browser, providing a seamless user experience.\n\nWhen the server's functionality becomes useful, Htmx live's ox.get and ox.post methods send only the necessary query or body parameters to the server. The server then responds with Datastar SSE (Server-Sent Events) patches, which are applied to the HTML page. This streamlined communication between client and server ensures optimal performance.\n\nSetting up Htmx live is a breeze, requiring just one script to be loaded onto the page. There is no need for a bundler, component runtime, generated client, or build step. The page can still be rendered as regular HTML by the server, making it compatible with existing infrastructure.\n\nHowever, it's important to note that Htmx live is designed for server-owned HTML, not untrusted markup or as a replacement for React. If a strict Content Security Policy (CSP) is in place, an explicit \"unsafe-eval\" decision may be required to enable the use of new Function for expressions.\n\nThe guide to Htmx live begins with building local state, and then progressively incorporates server functionality. This incremental approach allows developers to gradually adopt the framework without feeling overwhelmed.\n\nIn summary, Htmx live offers a compelling solution for building interactive web pages that stay lean and efficient. By focusing on local behavior and leveraging server resources only when needed, Htmx live provides a powerful yet straightforward approach to modern web development.",
  "summary": null,
  "key_points": [
    "Htmx live adds server functionality only when needed",
    "ox object provides expressions with element, state, event, ox variables",
    "Datastar SSE patches applied to HTML page for performance"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}