Created
April 5, 2017 05:10
-
-
Save tj/772db7933734760294814a60f6d5b8d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Package preact provides bindings to the preact library. | |
package preact | |
import "github.com/gopherjs/gopherjs/js" | |
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