nowfound

Dev tools · May 27, 2024

UG

Use Go's HTML/template to write React-like code

Hi all, I'm currently working on my hobby project, and one of the fun constraints I put in was to build using as less dependencies as possible. I chose Go as it has a really good standard library, and all went well for building backend. But for frontend, I was wondering whether I should break the constraint and go for React. I tried options like Web Components, but I really didn't like the ergonomics and I didn't want to use jQuery either. Out of curiosity, I was exploring Go's html/template package to see if I can write UIs in a React-like manner. I found most of the online docs using…

Alternativestop 24% of May 2024

In plain words

This is a guide for building user interfaces using Go's built-in html/template package with a React-like approach. It is designed for Go developers who want to minimize external dependencies while building frontend code. The method uses Go's standard library features to create component-based UI patterns without relying on third-party template engines or JavaScript frameworks, offering an alternative to Web Components and jQuery for hobby projects and full-stack Go applications.

written from the facts on this page · September 2026

From the sources

In the maker’s words, at launch

Hi all, I'm currently working on my hobby project, and one of the fun constraints I put in was to build using as less dependencies as possible. I chose Go as it has a really good standard library, and all went well for building backend. But for frontend, I was wondering whether I should break the constraint and go for React. I tried options like Web Components, but I really didn't like the ergonomics and I didn't want to use jQuery either. Out of curiosity, I was exploring Go's html/template package to see if I can write UIs in a React-like manner. I found most of the online docs using the "slots" like approach which I found unintuitive. But after trial and error, I found an approach that's very close to React and without using any 3rd party packages like templ. I'd like to share this with the community, not sure if it's a common approach - https://www.sheshbabu.com/posts/react-like-composition-using...

More dev tools this month

the category →
  • Dograh592

    The open source VAPI alternative

    Dev tools · 25d ago · dograh.com

  • Meridian530

    Don't let your work go unnoticed. Get promoted!

    Dev tools · 20d ago · meridiona.com

  • x1516

    Lovable for iPhone apps go from idea to App Store

    Dev tools · 11d ago · x1.new

  • Open-source GTM skills for technical founders

    Dev tools · 29d ago · gtmcofounder.com

  • OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.

    Dev tools · 1d ago · opentrailpaper.com

  • Nuphos380

    The AI-Native DevOps Workspace.

    Dev tools · 24d ago · nuphos.ai

Launched alongside, May 2024

the whole month →
  • Voicenotes1,487

    AI note-taker that's truly intelligent

    AI · 2024 · voicenotes.com

  • Wegic1,181

    The first AI web designer & developer by your side

    Dev tools · 2024 · wegic.ai

  • Insighto1,110

    Ship features users want

    Growth · 2024 · insigh.to

  • Ivee1,087

    The B2B influencer marketing platform

    Growth · 2024

  • Waxwing1,035

    AI copilot for every marketing task

    AI · 2024

  • AI powered zero-waste meal planner

    AI · 2024 · ohapotato.app