DEV Community

Discussion on: Why I moved from React to Svelte and others will follow

Collapse
 
arik14 profile image
Faisal Arisandi

Have you learn and dive into VueJS?
You said that you have looked for Angular 2 and VueJS.

I think if you have learnt about VueJS, even for the simple "Getting Started" part in its docs, you will recognize the Svelte almost in similar in style with VueJS, the Single File Component (SFC) style.

As you said have looked for Vue, I expect that you would say something like "Svelte is VueJS with ReactJS combined plus blablabla"
😁

Because it really is.
The separation of html, script and style, is what the SFC doing (template, script, style (scoped or global)).
The 'on:click' syntax, what the different with 'v-on:click' (or the shorten version '@click') in VueJS.

But the '{handleClick}' syntax is React way.

So, the 'on:click={handleClick}' is the VueJS combined with ReactJS.

Oh, I almost forget, the "store" for global state is also similar to Vuex (State Management for VueJS), ofcourse with different code to write and concept.

But anyway, nice post.
Thanks for sharing.
I almost consider using Svelte, when my friend and boss tell me about it.
But, we don't use it already.
And I didn't have yet plan to jump into company which using it.
😅

P.S: I still wandering the future where, people don't need to learn new (and always new) way to write Front End codes. The future where there are no Angular, VueJS, ReactJS, Svelte or whatever-will-be.

Just HTML, CSS/SASS, and JS.
But in a way that can harness the power of those framework, i.e: the reactivity, modular component, data binding, style binding, etc.

And people will stick to it for decades.


I don't know why, but I always think that the new framework is somehow better than previous one but always keep introducing new term, syntax, concept.
In my opinion, it looks so selfish improvement.

"on:click" (Svelte)
"v-on:click" (VueJS)
"@click" (VueJS)

Why don't we just stick with html syntax "onclick".

I know perhaps it has something to do with the parser for each framework.
But guys who develop those framework are genious. They would have found the way.
If they want to keep it that way.

But yeah, here the result.
Another syntax to learn.