Hacker News new | past | comments | ask | show | jobs | submit

Show HN: Gomponents, HTML components in pure Go

https://www.gomponents.com
So I like the idea of it but am feeling a bit wary about UI elements as runtime types. Good thing about this is the strong typing but then you have a fair bit of lispifying going on which I swing back and forth on. I actually like templ's approach on this (though hate the extra build step). So I finally just settled on plain old go templates. Not quite eloquent but just feels staple and simple. Clearly a lot of get off my lawn type of biases here :)
loading story #41875439
are event handlers possible? neither the Github repo nor the linked page showed an example of a button or form submission.
loading story #41875298
loading story #41875243
Awesome, now do it in Haskell!
There are at least two generations of libraries doing that in Haskell. There was blaze-html and then lucid afterwards to fix some monad laws.
loading story #41875641
Looks cool. There is also Templ[1] that does something similar, though uses codegen.

I wish there is an equivalent of Storybook for these things though, it would be really nice!

[1] https://templ.guide/

That’s awesome! I have a very similar project Dovetail, that tries to nudge you into making things accessible.

https://github.com/RoyalIcing/Dovetail

{"deleted":true,"id":41847600,"parent":41847587,"time":1728993505,"type":"comment"}