Comment by pier25

5 years ago

Objectively, the Svelte example is cleaner and easier to read.

The issue is not only the syntax, but the semantics. What happens to the scope when you nest #each expressions? Does it work with iterables (like for..of), or it behaves like for..in? I don't use Svelte, and I don't know those differences by reading the code. To me the nice thing about JSX is that is straight forward with JS semantics:

    const a = <div prop={expression()} />

is a DSL for:

   const a = factory('div', {prop: expression()}) 

is only a DSL to create tree structures (React is another story, you can use JSX without React).

Subjectively, I’d say. But since I agree that it’s cleaner and easier to read- I upvote you

Saying it is objective but not mentioning the reason really makes your statement subjective.