Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gomponents vs Templ article : fairness check #218

Closed
EwenQuim opened this issue Oct 3, 2024 · 2 comments
Closed

Gomponents vs Templ article : fairness check #218

EwenQuim opened this issue Oct 3, 2024 · 2 comments

Comments

@EwenQuim
Copy link

EwenQuim commented Oct 3, 2024

Hi Markus,

I'm writing an article about Go templating, about Gomponents vs Templ and I wanted to make sure I have a state-of-the-art article about your library.

Is it possible to read it and tell me if I get your library wrong somewhere? Of course, I've sent the article to Templ team for proofreading too.

https://nuage.quimerch.com/-/ewen/articles/templ-vs-gomponents

Thanks again for your lib ❤️

@markuswustenberg
Copy link
Member

Hi @EwenQuim,

nice that you're writing that! And thank you for asking for feedback.

I think it's a nice article with good points. Especially agree on the tooling situation. It's not something I've focused on, but I'd love to be able to have my IDE suggest gomponents in the same way as HTML. See #209 for that.

I have a few minor points:

  • Span(g.Text(fmt.Sprintf("%d", props.age)),): you can just use g.Textf here
  • Minus one to both libs because when you pass a struct, you can always forget to add a field (an unfortunate Go feature). True, but you could also use a function with regular args instead of passing a struct then. But I get your point.
  • I'm starting to use dot imports for All The Things, so it reads just Node instead of g.Node. You may or may not want to do the same thing.

Regarding the ask at the end: I've just opened #219 for this.

Thanks again, you're awesome! 😎

@markuswustenberg
Copy link
Member

I'm going to close this one. Feel free to comment if you need anything else from me regarding this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants