Skip to content

E0324: A deferred field has no loader ​

A field marked @ui.Defer("group") is loaded after the first render by the group's loader: the method marked @ui.Loads("group"), which takes a context.Context and returns an error. The page has none. A method named Load<Group> isn't one: a loader is declared with its attribute, never found by its name. Reported by vuka vet, the editor, at boot, and by vukavet.

Wrong ​

vuka
@web.Live("/applicants/{id}")
@ui.Island
type ApplicantDetail struct {
	ui.Live
	Name string
	CV   *CV @ui.Defer("profile")
}

func (p *ApplicantDetail) LoadProfile(ctx context.Context) error { … }
vuka
@web.Live("/applicants/{id}")
@ui.Island
type ApplicantDetail struct {
	ui.Live
	Name string
	CV   *CV @ui.Defer("profile")
}

@ui.Loads("profile")
func (p *ApplicantDetail) loadProfile(ctx context.Context) error { … }

Released under the MIT License. Vuka builds on Go and its tools, which are made by the Go Authors. Vuka is not affiliated with Google or the Go project. Go is a trademark of Google LLC.