Skip to content

Instantly share code, notes, and snippets.



Created Apr 5, 2017
What would you like to do?
// Package preact provides bindings to the preact library.
package preact
import ""
var preact = js.Global.Get("preact")
// Attrs of an element.
type Attrs map[string]interface{}
// H returns a new element.
func H(v ...interface{}) *js.Object {
return preact.Call("h", v...)
// Render function.
func Render(args ...interface{}) {
preact.Call("render", args...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment