GX3003: route value is not held by any gx.Collect
A page, an action or a form is declared and no gx.Collect call holds it.
Cause
A page, an action or a form is declared and no gx.Collect call holds it. The app does not serve a route that is not mounted.
Example
package shop
<h1>Shop</h1>package route
import "github.com/alternayte/gx"
type Home struct {
gx.Route `GET /{$}`
}package shop
import (
"github.com/alternayte/gx"
"app/shop/route"
)
var HomePage = gx.Page(func(c *gx.Ctx, in route.Home) (HomeViewProps, error) {
return HomeViewProps{}, nil
}, HomeView)gx check reports:
shop/shop.go:8:5: GX3003: route value "HomePage" is not held by any gx.CollectFix
- Add the value to the
gx.Collectcall of its slice. - Make sure that the list is in a
Groupcall of the app.