DEV Community

loading...

SVELTE. Will it ever have a chance against React.js?

JoshuaOkechukwu
Front end web developer, Enjoy working with Javascript and CSS preprocessors |SASS. Recently learned about SVELTE, the journey has been amazing. SVELTE makes everything simpler.
・1 min read

Discussion (10)

Collapse
dennisfrijlink profile image
Dennis Frijlink

Check this post: bit.ly/3pUQE8Y. But I think yes! Svelte has a lot of advantages against frameworks/libraries like Vue or React. Think of using no virtual DOM, the size of a compiled application and at the end many dislike the JSX syntax of React.

Beside that the bundle size of Svelte is one of the biggest advantages. A small compiled application in Svelte is about 1.5KB! Other frameworks like Vue or React or Angular will never be so small.

Collapse
parallax18 profile image
JoshuaOkechukwu Author

I think it has a chance too. First of all the syntax is as clean and simple as it gets. The file size is small. And the absence of the virtual Dom. All these give svelte a great chance against the other frameworks/libraries

Collapse
ivanjeremic profile image
Ivan Jeremic

I'm sure I heard on a podcast that the bundle size is only small in small Svelte apps, For bigger apps, the bundle size explodes in Svelte for whatever reason I have no idea.

Collapse
giorgosk profile image
Giorgos Kontopoulos 👀 • Edited

There is an inflection point after which svelte might become bigger in size than react. github.com/halfnelson/svelte-it-wi... The author of this study says that the inflection point is around 120KB which is theoretically very difficult to pass. In simple terms the reason this happens is that react ships a big runtime but small individual components meanwhile svelte compiles to bigger js component code but virtually no runtime. So in theory the more components you put on a page the faster the bundle size grows for svelte but react bundle size does not grow as fast.

Collapse
raguay profile image
Richard Guay

I have a Svelte app that I first did in Vue.js. The current size is half what Vue.js application was, and I added several large features above what the Vue.js application had. So, I think the podcast you heard was exaggerating some. It hasn’t been my experience with Svelte so far.

Thread Thread
ivanjeremic profile image
Ivan Jeremic

I think the creator of Svelte itself said this and he is aware of this and working on the problem, I will try to find the podcast.

Thread Thread
parallax18 profile image
JoshuaOkechukwu Author

I've also done some work with React.js and the same project with svelte. I can say the svelte version was smaller by Alot. I heard in a review that the virtual Dom as fancy as it sounds is just over head. You think that's true?

Collapse
dennisfrijlink profile image
Dennis Frijlink

Hmmm fun fact for research. Thanks for saying

Collapse
kalashin1 profile image
Kinanee Samson

I haven't worked with react but I think working with svelte is actually fun and easy.

Collapse
murunwas profile image
murunwas

I have moved all my apps to svelte, and I'm happy... No regrets, no more turning back