Hacker News new | past | comments | ask | show | jobs | submit
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.
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.
Totally. I am also in this journey where I keep going back and forth between templates and something typed. I really need something like native jsx inside go. Gosx anybody?
Isn't that basically Templ [0] then? But Templ has that extra build step for preprocessing and converting back to plain Go files.

For me, gomponents is the middle ground. You don't get everything, but quite a lot of JSX-like feel. I was inspired by JSX after all. :) [1] Although I called it GOX back then… :D

[0]: https://templ.guide [1]: https://www.maragu.dk/blog/gomponents-declarative-view-compo...