Love Go + HTMX. I pair it with a-h/templ for a bit more type safety on the template, components and partials. I just shared my whole toolkit too [1], I call it the "GUS stack" -- Go, Unix, SQLite. Inspired heavily by the exe.dev "GUTS" stack [2] but with HTMX instead of Typescript. Some other Go components in the kit... - cockroachdb/errors for errors with stack traces - templ for type-safe HTML templates (with htmx…
How I use HTMX with Go
11–20 of 121 posts
Re: How I use HTMX with Go
#12 return htmx.Write(w,
&htmx.Template{
FS: htmx.FS(ui.HTMX, "parts"),
Filename: "arrows.html",
Fields: []any{thread, up},
},
&htmx.Component{
HTML: `
{{$count}} points`,
Fields: []any{count, thread},
},
)
[1] https://github.com/cattlecloud/webtools/tree/main/htmxRe: How I use HTMX with Go
#13I did the first 90% by hand, and have done the last 10% (and README) with Claude, just to get it out there.
Re: How I use HTMX with Go
#14Re: How I use HTMX with Go
#15Re: How I use HTMX with Go
#16Love Go + HTMX. I pair it with a-h/templ for a bit more type safety on the template, components and partials. I just shared my whole toolkit too [1], I call it the "GUS stack" -- Go, Unix, SQLite. Inspired heavily by the exe.dev "GUTS" stack [2] but with HTMX instead of Typescript. Some other Go components in the kit... - cockroachdb/errors for errors with stack traces - templ for type-safe HTML templates (with htmx…
Re: How I use HTMX with Go
#17I think the best way to put it, when I'm working with HTMX it feels like the complexity of the codebase is growing at a 2:1 rate compared to the app itself. I always end up with some weird edge case that I can not come out of without some weird hack.
I get why people dislike Node packages, HTMX feels like it's an overcompensating response to that. But the time you save by not having to wrestle with JSON is tripled when you try to make the app actually look or feel good. It takes me 2 minutes to slap together a Mantine template [1] and tap into some of the best UI components, then I can embed the built static assets and end up with the same single Go binary.
Re: How I use HTMX with Go
#18While I love both Go and Alex, my experience with HTMX has always ended up being disappointing. I think the best way to put it, when I'm working with HTMX it feels like the complexity of the codebase is growing at a 2:1 rate compared to the app itself. I always end up with some weird edge case that I can not come out of without some weird hack. I get why people dislike Node packages, HTMX feels like it's an overcompe…
Re: How I use HTMX with Go
#19Love Go + HTMX. I pair it with a-h/templ for a bit more type safety on the template, components and partials. I just shared my whole toolkit too [1], I call it the "GUS stack" -- Go, Unix, SQLite. Inspired heavily by the exe.dev "GUTS" stack [2] but with HTMX instead of Typescript. Some other Go components in the kit... - cockroachdb/errors for errors with stack traces - templ for type-safe HTML templates (with htmx…
Could rebrand to the HUGS stack -- HTMX (or hypertext), Unix, Go, SQLite
Re: How I use HTMX with Go
#20Go + Datastar is simpler, I much prefer it.