Live data from Hacker News

Migrating from Vue 2 to Svelte

escape.tech

121–130 of 289 posts

Re: Migrating from Vue 2 to Svelte

#121

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…

Wowowow stop.. last time I seriously looked aeons ago (4 or 5 years? :D) there was Vue as the nice smaller thing as an alternative React.. besides some other few bigger names. Noe Vue2, and Vue3? That didn't age well? And Svelte?

Omg, doing (because I need to) C or C++ stuff, where you have (or lets say you are bound to for several reasons, compatibility, regulations,..) C++11.. or even C99 .. man I feel so old and slow as I potentially am, lol.

Re: Migrating from Vue 2 to Svelte

#122

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…

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…

> React + TypeScript [...] anecdote

I agree that that combination it is very ceremonial.

We now doing new projects in Elm as the JS/TS ecosystem simply does not cut it for me.

Re: Migrating from Vue 2 to Svelte

#123

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.

I was annoyed when I found out vuex4 was pinia. But I followed the guide and converted over and was suprised it works without any bugs. (Except for my typos during the migration) turned out great and I love the simplified api.

Re: Migrating from Vue 2 to Svelte

#124

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…

Excellent observation. This right here is what a senior frontend engineer, that has gone through a couple rewrites and hype cycles, looks like.

The fact that they used a popularity contest as justification is laughable: if you have more than 3 years in the field you have experienced the pattern that the new kid on the block, often untested and with smaller mind share, jumps to the top of any "which framework would you like to try next?" surveys, while the tried and tested one move towards the bottom.

https://emtemp.gcom.cloud/ngw/globalassets/en/research/image...

No stable and productive framework will ever be able to compete in hype and good PR than alpha-quality software.

Re: Migrating from Vue 2 to Svelte

#125

Svelte & SvelteKit has been wonderfully productive for me. It's a bit insane that I have adopted it across so many projects of mine despite the fact it is pre 1.0 (well that has more to do with me I guess), but I am just faster with it. I have used a lot of frontend frameworks over the years, and before SvelteKit Vue & Nuxt were what I was warming up to. The article really focused on measurable things like type check…

Same. I normally prefer boring old tech, but I’ve migrated all my projects over to Sveltekit. Yep, breaking changes are annoying but it’s worth it. It’s got the point where you’d need to pay me lot to work on a Vue or (especially) React project.

Re: Migrating from Vue 2 to Svelte

#126

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.

> - Very poor typescript support.

If you use class components and prop decorators, the TS support is actually pretty nice. Kinda boilerplate heavy, but nice.

Re: Migrating from Vue 2 to Svelte

#127
post #80

When is the olan to migrate from Svelte to something new that pops up next week planned? All jokes aside, its hilarious how fast frameworks become obsolete in JS.

The churn back in the backbone.js/Ember/Knockout generation was much higher. Seems to have mostly stabilized on React, Angular, and Vue, all about 10+ years old now. Though major versions of these admittedly can add a lot of breakage. (Angular 1 to 2 was devastating for many people).

Of the alternatives, Svelte may be the biggest, and is 6 years old.

Web Components are also a decade old concept (implemented to some degree for several years).

Re: Migrating from Vue 2 to Svelte

#128
post #34

Some months ago I did the same thing as TFA - took a look at Vue3 and decided to change my main project's UI from Vue2 to svelte. So far I've been really happy with it. In my case the big motivator was that with Vue, whenever I worked on my UI code I found I spent most of my time thinking about Vue and not about the UI. I think the key issue was that Vue seems to offer several different abstractions for each of the t…

I find your points rather weird.

> e.g. how to make a piece of state inside one component accessible from another.

That is logically the same with every component framework, there is only one correct way to design it, flowing inside data are props, outgoing data are events. Was always the same.

> Then when I saw Vue3 was adding a new, apparently separate way of

> doing things (the composition API), but also not deprecating any

> current abstractions, that was what specifically made me start

> looking for alternatives.

How does this makes any sense? There is no need to deprecate the component declaration cause of the way it works. Instead of exporting a native JS Object you just use defineComponent({...}) to get type annotations, that it.

Re: Migrating from Vue 2 to Svelte

#129
post #80

When is the olan to migrate from Svelte to something new that pops up next week planned? All jokes aside, its hilarious how fast frameworks become obsolete in JS.

Wrote some tools in php + html + vanilla js, around 15 years ago, still in use, with ZERO work to maintain them.

Wrote some tools in the last 4 years in the new fancy js ecosystem, and have to update them them permanently, migrate to new version, and and and.

I am sure, i did something right in the past, but i don't now what ;-)

Post reply on HN