← Back to context

Comment by diegof79

5 years ago

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).