mrmiguu / coco

Golang WebAssembly Framework
MIT License
110 stars 4 forks source link

🥥 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