Big claims need big evidence.
Big claims need big evidence.
Vue adoption does seems to be tapering
(Naively looking at download counts)
Could you give an example with JSX where templating will not cut?
> JSX components are functions or classes which are trivially composable.
This is framework's feature IMHO not language's.
> I can type functions and classes with typescript unlike string templates.
Situation where types are important in other frameworks is JS part not templates part. Could you give an example where typing is import purely in component's return value?
You will lose type-safety when composing components in template-based frameworks. It is jsx part where types are most important. Instead of getting runtime errors because you passed wrong props you get instant feedback from tsserver and compile error.
* I use React with typescript mainly and I understand what you are referring to.
JSX is decidedly not JavaScript, it is an extension to JavaScript.
> I do not have to learn a new language to iterate over an array.
Since you have to use map() and can't use a simple for-loop, not sure how knowing the language itself helps or not. Either way, loops and conditional are really the basics, you pick it up in a day or two for any template syntax.
> I can interact with it using whatever JS libraries I prefer.
Fair enough, but this prevents many optimizations because the render method can produce virtually anything.
> JSX components are functions or classes which are trivially composable.
This doesn't mean something else isn't as equally composable. Components are composable, doesn't mean they have to be classes or functions.
> I can type functions and classes with typescript unlike string templates.
What does this have to do with JSX ? I guess this is more valid claim for TSX. In any case, since svelte is a compiler, it should be possible to type-check components as well. And it doesn't even depend on typescript, so you can get the same static checks with vanilla javascript.
No, JSX is JavaScript. You can write it in function calls or JSX, it's just syntactic sugar.
> Fair enough, but this prevents many optimizations because the render method can produce virtually anything.
No, using a library doesn't mean the function used from the library isn't pure. Yes it could have side-effects, but the point is you aren't restricted. You can use pure functions or anything else.
> In any case, since svelte is a compiler, it should be possible to type-check components as well.
Yes. But it doesn't, and you get it for free because TSX is just TypeScript. If wishes and buts were candy and nuts...
Svelte's single file components, similarly, are not "dumb string templates". The compiler applies some correctness checking onto them at build time.