saminnet / coco

Golang WebAssembly Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

šŸ„„ Coco

Golang WebAssembly Framework

App.go

type App struct {
    Counter int
}

func (a App) OnTestClick() {
    a.Counter++
    coco.Set(a)
}

App.html

<div class="Test">
  {{.Counter}}
</div>

App.css

.Test {
  width: 160px;
}

Installation

go get github.com/mrmiguu/coco

Running the example

You should use go-wasm-cli to run this example.

cd $GOPATH/src/github.com/mrmiguu/coco/example
go-wasm start

About

Golang WebAssembly Framework

License:MIT License


Languages

Language:JavaScript 60.2%Language:Go 31.8%Language:HTML 4.9%Language:CSS 3.1%