gomponents, HTML components in pure Go
6 points by ahobson
6 points by ahobson
This is looking pretty good. There is even an Alpine JS plugin. It could indeed replace templ for me.
Is it really from 2020 and I hadn't noticed it until now?
Using a CSS class isn't how you indicate that a list item in a nav bar is active. It should use the aria-current="page" attribute, and you can style based on an attribute selector.
I'm not trying to be pedantic, I'm just very allergic to frontend best practices not being presented by people introducing new frontend tools. And I fear many Go programmers would not be aware of this themselves if they lack frontend experience.
This is really cool! I have been using templ myself to make reusable HTML components to use in Go. This would remove the need to build the templ templates. I'm going to give this a try in a future project!