Earlier quoted context omitted.
What's an example of a UI that you built with Mantine that you couldn't with htmx?
they never said "couldn't". they said "feels like the complexity"
How I use HTMX with Go
31–40 of 121 posts
Re: How I use HTMX with Go
#32I've always wondered, is there a way to visually preview the partials and whole pages? I'm used to modern niceties such as hot reload with Tailwind that I'd like to have with HTMX, which I'm looking for excuses to try.
Re: How I use HTMX with Go
#33Love 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…
I also add goverter for converting between sqlc models and template objects and return values. Like 50% of the boilerplate is generated and it makes type safety so nice
Re: How I use HTMX with Go
#34Love 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
#35The reason is that htmx requires a certain amount of flexibility in the HTML generated by the backend. Eg, you need to be able to generate a certain piece of HTML markup and put a tag immediately adjacent to it in some situations, and not in others. (Htmx updates the page title when it finds a tag at the top level.)
This kind of flexibility is difficult with traditional string-based templating engines, but trivial with language-embedded HTML libraries.
Eg, if your backend is in JS then a tagged template literal function like https://github.com/WebReflection/uhtml-ssr
If it’s a Go backend then a library like https://www.gomponents.com/
If it’s Scala then ScalaTags. And so on, you get the picture. The point is that a language-embedded system allows you to use the full power of your language to build abstractions and components, which htmx really benefits from.
Re: How I use HTMX with Go
#36Love 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
#37Re: How I use HTMX with Go
#38While 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
#39Love 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…
Hyperscript fits perfectly in the Go + HTMX stack to do DOM manipulation without having to make a server round trip or having to write a separate JS function.
I get that not many are fan of such declarative programming, but when there's already HTML file we're working with; Hyperscript feels just like an extension of it.
I have been working on a Open Payment Host[2] which handles multiple payment gateways and was able to perform complex DOM manipulation with just Hyperscript.