Hacker News new | ask | show | jobs
by novoreorx 631 days ago
gomponents look better; at least the `h.` prefix could be omitted. Also, it serves a simpler purpose than htmgo.

What do you think about https://templ.guide/? To me, the ability to still write raw HTML in Go is incomparable.

2 comments

I’m not quite sure what the roadmap looks like for gocomponents but it looks similar but I think it’s only filling one part of the puzzle. My plan for htmgo is to become essentially a ready to use framework for building your whole app, using very fast/lean modules, similar to Ruby on Rails, especially rails 8, and not just an HTML builder
What makes you believe the prefix can’t be omitted in htmgo? You just alias it the same way with a ‘.’
Sorry, I made a mistake. I thought the HTML tag functions were accessed through `ctx`, which is passed to the page function. It's true that we can import them directly to access `Div`, `Class`, etc.