-
Notifications
You must be signed in to change notification settings - Fork 92
Description
Support for HTMX / Hypermedia Development Patterns
I wanted to request that you consider that there are many HTMX developers looking for a good TS-based SSR framework for use with HTMX. HonoX looks like it's shaping up to be something very special and I think it would probably take very little effort to make sure that it plays nice with Hypermedia-driven app development patterns.
The one thing it would really need to work well with HTMX (or Hotwire, Unpoly, etc) is the ability to respond with partials – meaning a response that includes only one or more HTML elements with zero <html><head><body></html> boilerplate stuff. HTMX requests also include a header HX-Request: true. So this makes it possible to check for the presence of this header at runtime, then return just a partial for HTMX or the whole page for non-HTMX requests. Right now, Astro comes pretty close to allowing this behavior with export const partial = true -- but this is set at build time. So you can't conditionally render partial or full-page depending on presence of the HX-Request header.
Anyway, that's my request! Yoroshiku onegaishimasu!