View #
- Used own view library Gox
Usage with handler #
type Props struct {}
func ExamplePage() Node {
return Div(Text("Example page"))
}
func ExampleHandler() hiro.Handler {
return func(c hiro.Ctx) error {
return c.Response().Render(ExamplePage(c, Props{}))
}
}
Advice
- Page should have props property
func ExaplePage(c hiro.Ctx, props Props) Node { // ... }