W0306: A hand-written LiveSchema
A live page's LiveSchema method is what the compiler writes from its attributes: @ui.Mount, @ui.OnChange and @ui.Loads("group") on its methods, @ui.Bind, @ui.URL("q") and @ui.Defer("group") on its fields. ui.LiveSchema is exported so generated code, ejected code included, builds with go build, but it is not a method to write by hand for a page declared in a .vuka or .vuka.html file: write its attributes there. A page declared in Go (ejected code) has no attributes, so its LiveSchema isn't reported, nor are generated files. Reported by vukavet.
Wrong
go
func (d *Dashboard) LiveSchema(l *ui.LiveSchema) {
l.Field(&d.Q, ui.Bind{})
l.Mount(d.mount)
}Right
html
<!-- dashboard.vuka.html -->
<script lang="go">
package pages
type Dashboard struct {
ui.Live
Q string @ui.Bind
}
@ui.Mount
func (d *Dashboard) mount(ctx context.Context) error { … }
</script>
<input bind:value={Q} />