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?