News for hackers. Stuff that matters.
Re:Maud: A Rust macro for writing HTML by lucideer on Tuesday June 07, 2022 @09:08AM (#31653684)
> there's no implementation of JSX that can prevent its users from mixing the logic and the rendering if they want to do so: it will always be possible for a user to mix the JSX tags with arbitrary Javascript because the full JS language is available in JSX tags and JSX tags can be used in Javascript code.

That's fair. If that's what you're looking for, then JSX is not the answer. I don't think we disagree though - I was merely pointing out separation is possible (even if not strictly enforced).

Personally, I am a fan of the component-driven model (criticised above for "blurring the lines"). As I mentioned, it's a trade-off, and I think any potential "blurriness" is far outweighed by the context and reduced abstraction wins from a code-readability & codebase approachability perspective. Heavily separated templating efforts often leads to codebases with deeply nested hierarchies for views -vs- controller logic that require having 4+ split pane editors open just to understand extremely local snippets of data flow. This is particularly egregious when e.g. trying to audit codebases for injection mitigation.

There are no comments on this comment yet.