logoalt Hacker News

nzoschketoday at 9:00 PM1 replyview on HN

How does this compare to templ and templui? I see from the docs that gsx is templ compatible.

And why does this depend on node / npx? Something to do with the JSX syntax and parsing?

I wish go std templates were more ergonomic for components.

Past that I wish projects like templ or GSX have a simple go generate pipeline, and support html and text/markdown output including whitespace.

Until then I have a Frankenstein of a bunch of templating.


Replies

jackieliitoday at 10:18 PM

It doesn't depend on node for runtime. Only for dev: the vite dev server, and js bundling, nothing else.

Also I've been a long time templ & html/template user, also used templui. gsx is born out of my ergonomics desire from templ. gsxui is similar to templui, but makes bundling possible. Also borrowed pipeline filters from html/template. But you're right, this does involve a _build_ step. But I think it's worth it.

Later I'll add the bundler free version. But really, vite has been so useful. Just treat it as another tool.