Best Frontend Options for Golang API?

I built a backend API using Go and now I need to create a frontend for it. I’ve been using Next.js before but I keep running into issues where I bypass my Go backend by using Next API routes instead. This makes everything messy and defeats the purpose of having a separate backend.

The main problem is that with client-side rendering, users see a blank page for a couple seconds while the app fetches data from my Go API. Even with loading spinners, the user experience feels slow and clunky.

I want something that can:

  • Render initial content on the server so pages load instantly
  • Still allow interactive client-side features like button clicks and counters
  • Work well with my existing Go backend
  • Give me the component-based development that React provides

Someone suggested using Vite with React and just calling my Go API, but that still has the loading delay problem. I know PHP renders pages server-side before sending them to browsers. Is there a way to get that instant loading experience while keeping modern frontend tools?

What frontend approach would work best with a Go backend for this kind of setup?

go with sveltekit for that instant loading feel. it’s got built-in ssr and plays nicely with go apis. much less overhead than next.js, and you won’t get tempted into api routes since svelte doesn’t push that pattern. ssr works smoothly and client-side transitions feel natural.

have u checked out htmx with Go templates? just wondering why you’re sticking to React components? are there features u need? htmx lets your Go backend do the server-side rendering but still gives u dynamic interactions without all those annoying SPA loading times.