Hacker News new | ask | show | jobs
by TobyTheDog123 921 days ago
While this is incredible and I can't wait to use this with HTMX, I really wish it didn't require a CLI to generate the *_templ.go files.

Code generation is something I saw in Flutter/Dart a lot and it entirely killed my interest in it (mostly with JSON serialization/deserialization to classes).

Thankfully, it's by no means a show-stopper for me thanks to their hot reloading functionality. https://templ.guide/commands-and-tools/hot-reload

2 comments

I use Taskfile, fd (a 'find' alternative) and "entr" to get around any need to manually call 'templ generate'.

'fd . 'assets/view' | entr templ generate' - couple it with 'air' and developing is a lot easier. Looking forward to when Goland has better support for templ.

Why do you dislike code gen?