W0106: A hand-written ui.HTML or ui.IslandPage
ui.HTML is what the compiler writes for a .vuka.html file's markup: the markup as a string with labelled holes, and their values. It is public so generated code builds with go build, ejected code included, but it is not a way to write markup: markup is written in .vuka.html files, whose holes the compiler checks and keeps in step with the Go. Generated files (// Code generated … DO NOT EDIT.) and ui itself aren't reported.
ui.IslandPage is what the compiler writes for an island page: a .vuka.html file whose markup is one tag, the island component its header imports. Its struct is the island's, its exported fields the props.
Wrong
go
// card.go
func (c Card) View() ui.Node {
return ui.HTML(`<h2>{c.Title}</h2>`, c.Title)
}Right
html
<!-- card.vuka.html -->
<script lang="go">
package components
type Card struct {
Title string
}
</script>
<h2>{Title}</h2>Wrong
go
// orders.go
func (o *Orders) Render() ui.Node { return ui.IslandPage(o) }Right
html
<!-- pages/orders.vuka.html -->
<script lang="go">
package pages
import Orders "../web/islands/Orders.vue"
type Page struct {
ui.Live
Rows []Order `json:"rows"`
}
</script>
<Orders rows={Rows} client:load />