5 ms·
func (h *hello) Render() app.UI { return app.H1().Text("Hello World!") } Using a template would have been easier and more clear.
by habibur 5y ago
func (h *hello) Render() app.UI {
return app.H1().Text("Hello World!")
}
Using a template would have been easier and more clear.
- wingi 5y agoCheckout hyperapp - same design, but pure javascript.
- dalu 5y agoI agree that it feels unnecessary and uncomfortable. There might be a reason why he chose this vs plain text or template, not sure.
- Maxence 5y agoHi, go-app’s creator here. I did it in previous version and since there is no code check/lint on HTML templates within strings, debugging HTML was a pain in the ass. More clear is a matter of taste and you can do pretty clear code with this syntax.