DEV Community

loading...

Discussion on: Svelte is the most beautiful web framework I've ever seen

Collapse
jaxxeh profile image
Jaxxeh

In addition to what Jesse said, Svelte compiles to Vanilla JS and does not use the Shadow DOM. All the code is compiled and optimized to work directly on the actual (or 'light') DOM.

I also like the fact that you're using actual CSS in your Svelte components, and the compiler namespaces your CSS. You can also set it up to use various existing CSS frameworks (Tailwind, Bootstrap, Emotion, etc.) as well as PostCSS, PurgeCSS, etc.

Finally, using stores and events, communication and data-flow across components is very flexible and quite easy to use.

Collapse
slidenerd profile image
slidenerd

very stupid question but I had to ask, why wasnt working with the actual DOM done in Vue Angular or React? why only now with Svelte

Thread Thread
jesseskinner profile image
Jesse Skinner Author

Ultimately all the frameworks use the actual DOM, but React, Vue and (I think) Angular use what's called a "virtual DOM" to compare before vs after to see what needs to be changed on the page. Svelte doesn't need that, it compiles to just the DOM scripting needed without the overhead of a virtual DOM.

Collapse
karataev profile image
Eugene Karataev

Thanks for the addition, my interest to Svelte grows up with every positive feedback.
I just didn't get the Shadow DOM sentence. Did you mean virtual DOM?

Thread Thread
jaxxeh profile image
Jaxxeh

Sorry, yes, that's exactly what I meant. And you're welcome!