Group-income-simple: Consider switching from Vue.js to Svelte

Created on 4 Jul 2019  路  5Comments  路  Source: okTurtles/group-income-simple

Problem

  • Vue.js is a dependency that we might not need
  • A new framework called Svelte promises to "ditch the framework" by doing everything at compile-time, without a virtual DOM, thereby being both faster and with fewer dependencies
  • "50 times faster than Vue"

Solution

Research links:

Related:

  • #275 - Research nativescript-vue
  • Also look into the new mint language

Comparison with future Vue changes:

Frontend Core Enhancement Discussion Research Tooling

Most helpful comment

I tried Svelte some weeks ago to do some very basic experiments. I loved its minimal API to handle state! It seemed they really learned from React and Vue expertise and created our next step in FE development.

All 5 comments

I tried Svelte some weeks ago to do some very basic experiments. I loved its minimal API to handle state! It seemed they really learned from React and Vue expertise and created our next step in FE development.

My issue with Svelte is that it's not really JavaScript. The main benefit of using either a library or a framework is that you can use all the features of the language from your prior knowledge of it. Using a similar-but-not-quite-the-same language always has pitfalls.

For my 2垄, I've been looking into Web Components lately. The raw API is less than convenient, but that's true of DOM too. And so far, the only thing that's really been built on top of it is LitElement, which is more or less trying to mimic only one aspect of React.js (the auto-rendering), and misses the rest.

@sdegutis can you point out a JS feature that is not available in Svelte? As far as I know, everything it's available there, even new features through Babel.

It's not that there's a lack of features, but how the developer's mind works when reaching for features and patterns they're familiar with. The more compilers there are, the more they break those assumptions of what's happening. Some compilers are less complex, like TypeScript which only has the enum transformation (the rest is just stripped types). But Svelte actually rewrites variable access/assignment with non-trivial transformations. And the semantics of how it transforms code is very likely to change in the future at least once or twice. This is a lot of mental overhead. That said, lately it seems to be built on top of Web Components also. I think there's got to be a better way to do it though than a compiler, with how powerful JS is.

Personally I don't mind using a compiler mainly because of its performance benefits compared to react or any other popular UI Framework. But it's always good to hear the opinions from the other side of the spectrum

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hubudibu picture hubudibu  路  5Comments

mmbotelho picture mmbotelho  路  7Comments

taoeffect picture taoeffect  路  9Comments

mmbotelho picture mmbotelho  路  7Comments

sandrina-p picture sandrina-p  路  6Comments