Svelte frontend vs HTMX and hyperscript

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • Onboard AI - Learn any GitHub repo in 59 seconds
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • Revelo Payroll - Free Global Payroll designed for tech teams
  • SonarQube - Static code analysis for 29 languages.
  • html

    On template partials, they definitely don’t feel like the rest of a Go app, but are they really that different from using handlebars or JSX? Once I figured out a good architecture for my templates, I’ve been pretty happy rendering htmx on the server. You could also use an HTML library like https://github.com/benpate/html but it works best in small doses, instead of for a whole app.

  • gomponents-htmx

    HTMX attributes and helpers for gomponents.

    I've built www.gomponents.com for stuff like this and, in my not so humble opinion, it works great. I've got an HTMX extension for it as well: https://github.com/maragudk/gomponents-htmx

  • Onboard AI

    Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.

  • uhtml

    A micro HTML/SVG render

    I have to say that I am an extremist minimalist, so I use a nano-framework I developed for the frontend, with uhtml (https://github.com/WebReflection/uhtml) and some JavaScript libraries to help.

  • esbuild

    An extremely fast bundler for the web

    I use ESBuild (https://esbuild.github.io/) as a library for my almost pure Go toolchain, and it covers my requirements for almost 2 years now. ESBuild is the Go tool used in Vite, an incredible tool that I stopped using when I discovered that ESBuild covered all my needs.

  • svelte-mpa

    Svelte MPA, Multipage Svelte

  • air

    ☁️ Live reload for Go apps

    Do you use anything for live reloading? This is one aspect I miss when using gomponents compared to go templates, where I had a setup using Browsersync, which immediately refreshed whenever html/css/js changed. Now, since all HTML is within Go code, I have to recompile my go program to see changes, which takes up to ~5sec (I use https://github.com/cosmtrek/air for this).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts