Create Reusable Web Components with Go

The UX Toolkit open source project, focuses on providing functionality to create React-like reusable web components, known as cogs, using the Go programming language. The overarching goal of the project, is to create a collection of cogs that can be readily used by developers of Isomorphic Go applications.

A detailed introduction on implementing cogs is provided in the Isomorphic Go book.

Benefits of the UX Toolkit

Go Further

The UX Toolkit extends Go's reach on the front-end, by providing React-like functionality to create reusable components (cogs) for Isomorphic Go applications. Cogs are user interface widgets that are implemented in Go.

Modular Design

Cogs are implemented as standalone Go packages with the capability to manage their own state. A clear separation of concerns exists, where the cog's underlying logic is implemented in Go, and the presentation responsibilities are handled by Go templates associated to the cog.

Efficient Rendering

Cogs have an associated virtual DOM, allowing them to efficiently re-render themselves, when their state changes, saving you the trouble of having to write code to directly manipulate the DOM.

Automatic Static Assets Bundling

Once you've registered a cog on the server-side, the CSS stylesheets, JavaScript source files, and Go templates associated with a cog, are bundled automatically, behind the scenes.

Interoperable with JavaScript

Sometimes, leveraging an existing JavaScript solution might be the answer to your problem. Implementors of a cog, can expose functionality from existing JavaScript solutions and provide access to it using Go. Users of a cog, can readily deploy the cog without having to know, or deal with JavaScript.