DEV Community

Discussion on: Vue or React?

Collapse
 
adithyarafk profile image
AdithyaR-afk • Edited

Svelte is just better in every aspect. React suspense? This is already implemented in Svelte as Await block including a catch block. Server components ? Lol it this was present in svelte sapper from day 1 . And also your comment about unlearning JS? But React forces you to learn JSX which is the single worst thing about the framework. Don't get me started on Redux and Mobx. And the whole Should component update hooks shows how crappy React is and how much developer effort is needed to make a performant app

Collapse
 
ryansolid profile image
Ryan Carniato • Edited

I worry the content here is misleading. Await block !== Suspense. Here are some people looking at actually implementing Suspense in Svelte. The Server Components in React is subtly different in that they do serialize partial updates after the client has already been rendered, and they support out of order streaming. Svelte/Sapper doesn't support either of these. JSX is like a template language, so obviously, people have different perspectives. It is funny that libraries with Single File components that put markup with their scripting don't catch the same flack but to each their own.

However, I agree with your last point. The effort to be explicit about blacklisting change starts you at a place of less performance. It has the benefit of things at minimum update instead of potentially not updating which can happen with any sort of auto-tracking system. So the mentality of leaving the optimization for when you want to optimize is logical. But the library presumably has enough information to make some of those decisions for you. I think this is more of a philosophical one though.

Thread Thread
 
adithyarafk profile image
AdithyaR-afk

Suspense almost serves the same functionality of await. Ofcourse there can be more control in react suspense(ex: handling promise timeouts) but the same can be done in svelte via wrapping your original promise in another promise wrapper ( which ironically you need to do for react suspense to work anyways).
As for JSX I agree it is subjective.

Collapse
 
ghamadi profile image
Ghaleb

So many comments about Svelte! Now I'm thinking my next step from Vue should be to learn Svelte not React. lol