News for hackers. Stuff that matters.
Re:Show HN: Build progressively enhanced reactive HTML apps ... by kindofabigdeal on Wednesday May 10, 2023 @07:18AM (#35885903)
The one thing that golang really needs is a templating library that doesn't suck, Html bindings in this language feel more like an after thought and this is coming from a person that really likes this language.
Re:Show HN: Build progressively enhanced reactive HTML apps ... by lormayna on Wednesday May 10, 2023 @08:22AM (#35886318)
Have you tried this: https://templ.guide/ ?

This is a very simple and clean Go templating library.

Re:Show HN: Build progressively enhanced reactive HTML apps ... by austinpena on Wednesday May 10, 2023 @09:38AM (#35887184)
I’m really looking forward to IntelliJ support
Re:Show HN: Build progressively enhanced reactive HTML apps ... by jakelazaroff on Wednesday May 10, 2023 @09:53AM (#35887379)
I spend most of my time in the JavaScript ecosystem, but I've worked with Go and Rails and have been working with Django recently and my take is that this seems to be true for most other languages/frameworks.

There are plenty of valid criticisms of React/etc, but the one thing they got really really right was making "templates" be normal functions that return a data structure representing the HTML. Logic is way less awkward, no global variables spanning partials in different files and it's impossible to write incorrectly nested markup. I really wish backend-only frameworks would steal that idea.

Re:Show HN: Build progressively enhanced reactive HTML apps ... by quickthrower2 on Wednesday May 10, 2023 @10:31PM (#35896608)
Next.js very literally does by running React on the backend too!