E0336: A live page hook that doesn't fit
A hook is a method of the page marked @ui.Mount, @ui.OnChange or @ui.Loads("group"). A deferred group is a name, as @ui.Defer gives it, and a group has one loader. The app refuses the page at start-up; vukavet reports it from the generated LiveSchema.
Wrong
vuka
type Dashboard struct {
ui.Live
Rows []Row @ui.Defer("lists")
}
@ui.Loads("the lists")
func (d *Dashboard) loadLists(ctx context.Context) error { … }Right
vuka
type Dashboard struct {
ui.Live
Rows []Row @ui.Defer("lists")
}
@ui.Loads("lists")
func (d *Dashboard) loadLists(ctx context.Context) error { … }