That's not the only problem with JSX...the very simple example I could think of: can you create a solid component with this html without touching anything?
Title
Paragraph
No, because you would have at least to wrap it in a fragment
Oh sure...then I guess is just svelte lol. But the point I'm trying to make is that saying that Jsx is an extension of html and svelte is not is just wrong as is actually the opposite
It's things like Svelte's # if, :else, # each, # await, :then, :catch, etc. that I was referring to. To me that special syntax feels unnecessary. Although I gotta admit, that await, then, catch feature is quite cool; I just found out about it.
Well in JSX you still have ternaries and map that are not part of the html, it's just a matter of syntax, the difference being that in svelte you have a specific design behind them with the added benefit of a clear separation for readability.
P.s. we recently shipped an experimental to just use
Comments
Title
Paragraph
No, because you would have at least to wrap it in a fragment
I'm outside
This will show "I'm outside" in black in JSX and red in html.
For the moment this is also an issue with svelte but you'll get a warning because we plan to fix this in svelte 6
P.s. we recently shipped an experimental to just use