Live data from Hacker News

Migrating from Vue 2 to Svelte

escape.tech

201–210 of 289 posts

Re: Migrating from Vue 2 to Svelte

#201

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 s…

React and vue are still going along.

Vue 3 was a big shift, like react hooks. It will take some time for community to stop whining about it, and accept old version is legacy like react classes

Re: Migrating from Vue 2 to Svelte

#202
post #22

echos many of the same things i loved about svelte when i got involved in 2019: https://www.swyx.io/svelte-why people always call out the small community to be a downside, so a few of us started Svelte Society to fix that (very humble numbers compared to react, Rethinking Reactivity is probably the best starting point for most https://youtu.be/AdNJ3fydeao ). i actually think theres a “be careful what you wish for” as…

I find a lot of Svelte users are pretty religious and hysterically anti-React. When the first version of Svelte Query was announced, people were trashing the API because it looked like hooks and "you don't need those in Svelte", concluding the library must be useless. There's a lot of the "Svelte is the one true way" talk, similar to when Vue was the main alternative to React. The core team seem very reasonable but I…

I was looking at the svelte-query PRs recently, and I didn't see anything that looked like "trashing".

I agree that if you want to keep the patterns that make React-query so amazing, but apply them in Svelte, you should use idioms that make sense in Svelte. The exact syntax (`useQuery` and friends) isn't the point, and the `use[A-Z].*` naming convention actually communicates that you're hooking into the React lifecycle... which obviously doesn't make sense in Svelte.

Re: Migrating from Vue 2 to Svelte

#204

Earlier quoted context omitted.

> SSR first applications and might likely think about using a light weight framework like Svelte for a client rendered 'feature (or) two' like I did. Rich Harris called this "transitional apps" :) See this excellent talk: https://www.youtube.com/watch?v=860d8usGC0o There's now active work to finally let you build whatever you need from a single code: be it MPA SPA, or anything in between, seamlessly. Including things…

Thanks for the resources, Wouldn't rehydrating the specific page which uses web component eliminate the need for explicit SSR support in the JS framework and thereby it comes down to whether the framework has good support web-components or not in the first place?

> Wouldn't rehydrating the specific page which uses web component eliminate the need for explicit SSR support in the JS framework

Erm.... No. If you don't have SSR then it doesn't matter if it's web components or not: they will be instantiated at runtime.

> it comes down to whether the framework has good support web-components or not in the first place?

All of them have decent support for web components (at least for "consumption").

The reasons they don't support them as a foundation (and at most emit web components if you tell them to) is that they don't want to deal with all the stuff like no SSR support, the need to still have all the layers above for things like lazy loading, progressive enhancement and a whole laundry of issues that none of the non-web-component frameworks have: [1][2]

[1] Why I don't use web components https://dev.to/richharris/why-i-don-t-use-web-components-2ci...

[2] https://twitter.com/Rich_Harris/status/1198332398561353728, explanation on SVG: https://twitter.com/Rich_Harris/status/1198339672361119745

Re: Migrating from Vue 2 to Svelte

#205

Earlier quoted context omitted.

> planning to use Svelte for a component in your SSR application please note that that their Web Components support No idea why you put SSR and web components in the same sentence, and in a way that presumes that web components are required for that, or at all. 1. web components are literally incompatible with SSR and all SSR solutions for them are ugly hacks. 2. It's not just personal "fondness" that prevents Svelte…

> why you put SSR and web components in the same sentence Web components are a browser standard; so anyone thinking about the long haul for their web product would be well advised to think about web components as well. > web components are literally incompatible with SSR Declarative shadow DOM is an emerging browser standard that is literally compatible with SSR, and is already supported by Blink-based browsers.

I wanted to believe it as well, but the fact is their implementation is so clunky and lackluster they are more trouble than they are worth.

Re: Migrating from Vue 2 to Svelte

#206
post #189

Earlier quoted context omitted.

Imo, makes it the best bet for building anything. There's still a new JS framework everyday but if you ignore all that noise and for production-quality software just have a look at React and the most popular meta framework on it, Next.js, you'll be more than alright.

Next.js is not a good general purpose React framework. It is good for static sites with sparse dynamic pages but nothing more complex. And the documentation is still woefully inadequate. Don't be like me, choosing to build an entire app on Next.js and hating every moment of it after the honeymoon period ended 2 weeks in. Live and learn.

Hey there, I'm on the Next.js team. Sorry about this experience. I would argue Next.js is a general purpose React framework – we enable you to take advantage of all the latest React features. Apologies if there was a gap in the documentation. Could you share more so we can improve? You can also email lee at vercel dot com.

Re: Migrating from Vue 2 to Svelte

#207
post #167

People jump back and forth between Vue and Svelte (or another JS framework of the year), while Aurelia quietly does its job without too much hype.

Is Aurelia even being actively developed? Aurelia 2 has not reached stable while vue has moved to v3

Maybe not as actively and fast as I'd like, but v1 is stable enough to meet my needs, I really like this framework.

Re: Migrating from Vue 2 to Svelte

#208
post #22

echos many of the same things i loved about svelte when i got involved in 2019: https://www.swyx.io/svelte-why people always call out the small community to be a downside, so a few of us started Svelte Society to fix that (very humble numbers compared to react, Rethinking Reactivity is probably the best starting point for most https://youtu.be/AdNJ3fydeao ). i actually think theres a “be careful what you wish for” as…

I find a lot of Svelte users are pretty religious and hysterically anti-React. When the first version of Svelte Query was announced, people were trashing the API because it looked like hooks and "you don't need those in Svelte", concluding the library must be useless. There's a lot of the "Svelte is the one true way" talk, similar to when Vue was the main alternative to React. The core team seem very reasonable but I…

> I find a lot of Svelte users are pretty religious and hysterically anti-React.

yes this does happen too, i do acknowledge that. just making very subjective generalizations based on my exp

Re: Migrating from Vue 2 to Svelte

#209

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 general agreement with one caveat; Svelte is hardly new. Rich Harris was using it at NYT 4 years (at least) ago, and it's been open source since. It's caught on because of; a pushback against React, the surging popularity of Vue, the sudden popularity of Rollup (which has been around just as long, but adoption in Snowpack/Astro and Vite was a game changer), Rich being hired by Vercel and more weight behind Svelte. All of those things have gelled to create a popularity surge in the framework. I'd shy away from calling it the "new hotness," and simply bear in mind that it's just trending lately.

Re: Migrating from Vue 2 to Svelte

#210
post #44

Earlier quoted context omitted.

They recently released a beta of SolidStart, their answer to Next.js/SvelteKit/Remix, etc, and I’ve been really liking it. A lot of good ideas pulled from the other frameworks. https://www.solidjs.com/blog/introducing-solidstart

cool. any blessed scoped styling solution or is it the usual wild west?

Yup, CSS modules work out of the box. https://start.solidjs.com/core-concepts/css-and-styling
Post reply on HN