But I think for future projects I might use HTMX + Tailwind.
Show HN: Build progressively enhanced reactive HTML apps using Go and Alpine.js
31–40 of 45 posts
Re: Show HN: Build progressively enhanced reactive HTML apps using Go and Alpine.js
#32Re: Show HN: Build progressively enhanced reactive HTML apps using Go and Alpine.js
#33Earlier quoted context omitted.
The first step counter button is supposed to reload the page. The second step buttons update the page w/o reload
The second counter adds and subtracts values other than 1 and therefore seems broken.
Re: Show HN: Build progressively enhanced reactive HTML apps using Go and Alpine.js
#34I'm currently working with Alpine.js in order to try to build "Universal Components" or "Hypermedia Components". Where you just hit a URL and get your component like /components/infinite-canvas or /components/svg-2-base64 or /components/lib-somelib. [1] ilse.ink/components(It's not ready yet)
ilse.ink/components didn't work. Could you post a link to it?
Re: Show HN: Build progressively enhanced reactive HTML apps using Go and Alpine.js
#35The second example counter is jumping around instead of incrementing/decrementing by 1. Is state being shared between users or somesuch? Or is it because I first clicked the full reload example several times? iOS
The state is shared between users for the demo. Its possible to separate state in the library per user but I haven't enabled it.
Re: Show HN: Build progressively enhanced reactive HTML apps using Go and Alpine.js
#36Re: Show HN: Build progressively enhanced reactive HTML apps using Go and Alpine.js
#37The 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.
This is a very simple and clean Go templating library.
Re: Show HN: Build progressively enhanced reactive HTML apps using Go and Alpine.js
#38I ended up packaging my frontend in an nginx container and using that same nginx container as a proxy for the backend but the whole time I thought maybe this small project would be easier if everything was served by go.
Will definitely keep an eye on this for future stuff.
Re: Show HN: Build progressively enhanced reactive HTML apps using Go and Alpine.js
#39The 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.
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 using Go and Alpine.js
#40The 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.
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.