Live data from Hacker News

Migrating from Vue 2 to Svelte

escape.tech

111–120 of 289 posts

Re: Migrating from Vue 2 to Svelte

#111
post #66
post #18

Has anyone worked on a very large Svelte project yet? I work on a large React app in real life, but have been learning Svelte in my off time - there are some nice aspects like the out of the box state management, the syntax and structure is a bit easier to learn than React, but my intuition is a Svelte project would become unwieldy for a very complex app (React class components that are hundreds of lines long with do…

We built Roomlio entirely with svelte. Large app and many components. Having used react and angular on production apps in the past, I much prefer svelte. That being said, I am sick of framework fatigue and going forward I would probably choose raw web components and a simple template literal based template library like lit-html (not lit element). Write all the other bits ourselves.

If you are sick of framework fatigue, why not sticking with the framework you know ?

It seems to me that using raw web components you would end up writing your own custom framework, which would be yet another framework but with probably less support

Re: Migrating from Vue 2 to Svelte

#112

Earlier quoted context omitted.

In what way is being on Vue 2 painful? Using it in production, zero problems, everyone understands it, does everything we need. Plan to migrate to Vue 3 for the nice to haves and to keep up to date, but Vue 2 is not painful at all. Considered React but I think Vue will be more productive for the team as a whole in the long term. Vue is more intuitive, better designed, and structured. But totally understand React has…

As someone working in a large Vue 2 app: - Very poor typescript support. - Poor performance (compared to Vue 3). - Ecosystem has already started lagging behind (e.g. Vue Testing Library for v2 has out of date dependencies, and no one is actively maintaining it) - Nuxt 2 hasn't made any releases in ages.

- Nuxt only matter if you want to use it, is not Vues problem, because you talking about another software which addresses a different problem. - Typescript support is only a problem if you want to use Typescript, imagine, there is also a world beyond TS. - Performance, often a matter of design and understanding your framework

Re: Migrating from Vue 2 to Svelte

#113
As always, I find these ranking-based justifications for decisions just plain stupid and childish. Also with Vue 3 you won't have any issue and it is already out for a while, so what have you been doing anyways?

Re: Migrating from Vue 2 to Svelte

#115

The very first paragraph leads me to believe this is just a rewrite into svelte for the sake of it - I get it, Svelte is the new hotness on the FE-js-block, but this entire post stinks of "someone on the dev team advocated and fluffed enough figures to convince us. So now we're going to tell you why it was the right choice!" I say all this pretty confidently as someone currently maintaining a massive legacy vue2 app…

Migrating from Vue2 to Vue3 is not that hard with the compat layer of Vue 3.1, it allows you to convert your code progressively.

I'll guess Vuex -> Pinia is more work.

Re: Migrating from Vue 2 to Svelte

#116
post #29
post #7

Still don't understand why people prefer magic templated front-end frameworks. Reading non-standard HTML just sucks. What even is "$:" or why does Vue require non-standard javascript ref("") objects...

and JSX somehow gets your blessing? let he who is without sin…

JSX compiles down to standard JS

Re: Migrating from Vue 2 to Svelte

#117

The very first paragraph leads me to believe this is just a rewrite into svelte for the sake of it - I get it, Svelte is the new hotness on the FE-js-block, but this entire post stinks of "someone on the dev team advocated and fluffed enough figures to convince us. So now we're going to tell you why it was the right choice!" I say all this pretty confidently as someone currently maintaining a massive legacy vue2 app…

In what way is being on Vue 2 painful? Using it in production, zero problems, everyone understands it, does everything we need. Plan to migrate to Vue 3 for the nice to haves and to keep up to date, but Vue 2 is not painful at all. Considered React but I think Vue will be more productive for the team as a whole in the long term. Vue is more intuitive, better designed, and structured. But totally understand React has…

Note: used Vue 2 and 3 with JavaScript instead of TypeScript, so cannot comment on the latter.

Personally, I rather enjoy the syntax in Vue 3 which makes using the Composition API more pleasant and makes it feel more like React, instead of something more boilerplate heavy: https://vuejs.org/api/sfc-script-setup.html

Of course, Composition API itself is also available in Vue 2 (at least the newer versions) as a plugin, but personally I didn't see anyone using it in the older version. Either way, it can make code easier to write!

Furthermore, starting out new projects, regardless of which version you use, Pinia is a great option, which you won't see in many of the older Vue 2 projects (but could use if you started a new one with Vue 2, although that's not a good option because of EOL): https://pinia.vuejs.org/

Aside from that, Vue 3 still lacks some component library support in some cases, last I checked so perhaps that's an argument in Vue 2's favor (until everything is updated): https://news.ycombinator.com/item?id=32916677

React feels good in some cases, for example thanks to new solutions like https://react-query-v3.tanstack.com/ but at the same time seems to be getting more overcomplicated as time goes on (Vue feels like it does hooks in a more clean way, you don't need to deal with the complexity of Redux either).

The last React + TypeScript codebase that I looked at felt like it's just going to slow down anyone who works with it, which seemed to be true, judging on how fast people iterated with it vs a Vue project. Note: that's an anecdote.

Then again, the only good front end technology with TypeScript that I've used was Angular, even though it crumbled under its weight otherwise sometimes (once again, in regards to iteration speed in particular).

Re: Migrating from Vue 2 to Svelte

#118

Earlier quoted context omitted.

As someone working in a large Vue 2 app: - Very poor typescript support. - Poor performance (compared to Vue 3). - Ecosystem has already started lagging behind (e.g. Vue Testing Library for v2 has out of date dependencies, and no one is actively maintaining it) - Nuxt 2 hasn't made any releases in ages.

- Nuxt only matter if you want to use it, is not Vues problem, because you talking about another software which addresses a different problem. - Typescript support is only a problem if you want to use Typescript, imagine, there is also a world beyond TS. - Performance, often a matter of design and understanding your framework

[deleted]

Re: Migrating from Vue 2 to Svelte

#119

As always, I find these ranking-based justifications for decisions just plain stupid and childish. Also with Vue 3 you won't have any issue and it is already out for a while, so what have you been doing anyways?

Come on, what do you want?

They’re literally going:

- we picked svelte

- we got these benefits from it

I don’t agree with everything they’re wrote but it was interesting to see they’re happy with it.

> All in all, the aforementioned benefits and gains make our developer experience much more enjoyable

Good for them. Glad it worked out.

I will not be doing the same. I do not presume my experience would be the same.

> I find these ranking-based justifications for decisions just plain stupid and childish

Is no one allowed to have an opinion if it doesn’t match up with yours?

It’s just stupid to make a decision, do a thing, then blog about why you did it how it worked out for you?

Pretty harsh.

Re: Migrating from Vue 2 to Svelte

#120

Re events - You can type events in Vue with `defineEmits`: https://vuejs.org/api/sfc-script-setup.html#defineprops-defi... Re global enums - I'm not sure what the author means about global enums - anything imported into your Vue file can be used in the ` `. Re styles - Style is automatically scoped in Vue SFC files, too - I believe it was the first component framework to do this. This article and migration seems not…

> Style is automatically scoped in Vue SFC files

is global, is scoped. But comparing frameworks based on having to write at most one extra scoped property in each file, or having to wrap HTML template in a is laughable. You get a hundred times the time back the first time you need a library not available in the smaller ecosystem.

Post reply on HN