E0323: Bad defer: tag
@ui.Defer("group") (or the tag defer: of earlier releases) leaves a field out of the first render; the loader of its group, the method marked @ui.Loads("group"), sends it after. A group is a Go name. A deferred field is the server's to load, so the component can't set it (@ui.Bind) and the URL can't fill it (@ui.URL). Reported by vuka vet, the editor, and at boot, and by vukavet.
Wrong
vuka
type Dashboard struct {
ui.Live
Stats []Stat @ui.Defer("the stats")
Q string @ui.Bind @ui.Defer("q")
}Right
vuka
type Dashboard struct {
ui.Live
Stats []Stat @ui.Defer("stats")
Q string @ui.Bind
}
@ui.Loads("stats")
func (d *Dashboard) loadStats(ctx context.Context) error { … }