Specifically: since it uses a templating system, you can't pass around interface definitions easily:
- https://github.com/sveltejs/svelte/issues/3480 (no dynamic slots)
- https://github.com/sveltejs/svelte/issues/5381 (can't wrap children)
You can always find workarounds for these cases, often using `<svelte:component>`, but React's Javascript/Typescript-centric design avoids such issues before they even occur. For instance, I can trivially define a tabbed interface by mixing strings, JSX, and components, without imposing any DOM-structure. The component that reads this definition can use it to build a tabbed-view on mobile, and a master-detail-view on desktop. It could even build a table of contents.
In the definition, I can still work mostly with strings, but fall back to JSX in the rare case where I do need some advanced formatting:
const tabs = [
{ name: "Tab 1", icon: <img ... />, content: MainTab },
{ name: <>Tab with <b>bold<b/> text</>, icon: <MyIconComponent ... />, content: SecondTab },
]
Again, I like Svelte, but I'm not yet sure whether the better syntax is worth the reduced expressivity.