News for hackers. Stuff that matters.
Re:Show HN: Nue – Apps lighter than a React button by spiffytech on Tuesday April 01, 2025 @08:49AM (#43546170)
Personally, I consider it a strike against a frontend framework if I can't type check my templates. They're entirely data-driven — exactly the kind of place where type checking is the least effort but still a a big help.

In any nontrivial project, templates become a large fraction of my LOC, and it's already challenging to confirm they work right and don't break. Type checking that I'm passing in the data they expect, and that they're reading valid properties, is a cheap way to get a big win.

Web standards are great, but I'm not sure what "heavy lifting" they do that would make me feel like type checking was unnecessary.

Re:Show HN: Nue – Apps lighter than a React button by mubou on Wednesday April 02, 2025 @12:18AM (#43553642)
I agree. It's far too easy to make a change to your model that removes/renames some property, but not update one template that you forgot uses it too. Without screendiff testing, that sort of bug will easily make it into prod.

This is one of the reasons I like C#'s .cshtml (Razor) syntax. The entire file is compiled to C#, so when you do `<div>@Model.Foo</div>` the build will fail if Foo doesn't exist. String-based (rather than compiled) view templating is, IMO, a mistake.