←back to thread

67 points markusw | 1 comments | | HN request time: 0.202s | source

Hey everyone! I just released v1.0.0 of gomponents last week. It's an HTML component builder in pure Go, with a DSL-like HTML syntax. It's been 4 years in the making, and makes it really easy to build HTML in your web apps.
Show context
flashgordon ◴[] No.41874971[source]
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 :)
replies(1): >>41875439 #
OccamsMirror ◴[] No.41875439[source]
I agree with you, but I like Gomponents over html templates due to the type safety. It's also easier to reason about with. Some of my html templates can get quite difficult to maintain, with often the context not being obvious.
replies(2): >>41875515 #>>41876471 #
1. markusw ◴[] No.41876471[source]
I started with html/template, but got fed up with it because I thought it was so hard to pass data around to different components. I don't know, I just didn't jell with it.