Show HN: Gomponents, HTML components in pure Go
41–50 of 50 posts
Re: Show HN: Gomponents, HTML components in pure Go
#42This is a horrifyigly bad idea.
Re: Show HN: Gomponents, HTML components in pure Go
#43Re: Show HN: Gomponents, HTML components in pure Go
#44I saw the dot imports and thought “What a neat feature! I wonder why nobody uses it.” Then I googled it and saw a million articles saying how they should be avoided and removed from the language because they make code more difficult to understand. Typical gophers, can’t accept that there’s a time and place for everything and need to have a hard rule to use that applies to every single situation. Imagine that code, bu…
Re: Show HN: Gomponents, HTML components in pure Go
#45I saw the dot imports and thought “What a neat feature! I wonder why nobody uses it.” Then I googled it and saw a million articles saying how they should be avoided and removed from the language because they make code more difficult to understand. Typical gophers, can’t accept that there’s a time and place for everything and need to have a hard rule to use that applies to every single situation. Imagine that code, bu…
You can rename imports to whatever you like, but the default name for the package that contains the HTML elements is `html`, not `gocomponents`.
Re: Show HN: Gomponents, HTML components in pure Go
#46While acknowledging the use case of "the designer who doesn't know how to program" and the desirability in some sense of separating logic from data, if I am going to slam together some HTML as a programmer, with no "non-programmer" designer in sight, I tend to slap together a local version of templates like this if I can't find a good one available. The reason is, if I'm going to mix logic and presentation anyhow, wh…
Re: Show HN: Gomponents, HTML components in pure Go
#47This is a horrifyigly bad idea.
Re: Show HN: Gomponents, HTML components in pure Go
#48Re: Show HN: Gomponents, HTML components in pure Go
#49I just learned Golang, and i liked your idea, i'm going to test it soon! saved in bookmarks
Re: Show HN: Gomponents, HTML components in pure Go
#50Earlier quoted context omitted.
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...