Live data from Hacker News

Migrating from Vue 2 to Svelte

escape.tech

191–200 of 289 posts

Re: Migrating from Vue 2 to Svelte

#191

Earlier quoted context omitted.

> Bo idea why you put SSR and web components in the same sentence A typical JS framework fence sitter would build 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. > There are multiple documented downsides, including by Rich Harris, the author of Svelte In link [2] of my parent comment I've mentioned those, I've no techn…

> 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?

Re: Migrating from Vue 2 to Svelte

#192
post #97

Earlier quoted context omitted.

SvelteKit isn't Svelte's UI framework. SvelteKit is a full web framework for serving Svelte apps. It's essentially Sapper + Svelte in a more harmonious combination. I have no opinions about any of these libraries and frameworks for business applications.

SvelteKit is going ot be Django/Ruby on Rails of frontend frameworks. Due to integration and polish, it is so much easier to use than anything I have developed with on Angular, React and even older stacks like jQuery.

How is typescript support? I found that a bit lacking when I was using Svelte (and I otherwise love svelte)

Re: Migrating from Vue 2 to Svelte

#193
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.

What do you recommend instead (or are looking at)?

Re: Migrating from Vue 2 to Svelte

#194

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 2 hasn't made any releases in ages.

FWIW, Nuxt 3 was released in November. https://nuxt.com/v3

Re: Migrating from Vue 2 to Svelte

#196
post #189

Earlier quoted context omitted.

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.

What do you recommend instead (or are looking at)?

Sorry, I wouldn't know. I got out the frontend world after that experience, and I don't think I've seen any solid answer yet.

Re: Migrating from Vue 2 to Svelte

#197
post #97

Earlier quoted context omitted.

SvelteKit isn't Svelte's UI framework. SvelteKit is a full web framework for serving Svelte apps. It's essentially Sapper + Svelte in a more harmonious combination. I have no opinions about any of these libraries and frameworks for business applications.

SvelteKit is going ot be Django/Ruby on Rails of frontend frameworks. Due to integration and polish, it is so much easier to use than anything I have developed with on Angular, React and even older stacks like jQuery.

> SvelteKit is going ot be Django/Ruby on Rails of frontend frameworks.

I use it for my production app, so I'm a big supporter, but I don't think this is true. It's an extremely light framework that doesn't offer anywhere close to the feature support of Django or Rails, and as far as I'm aware it doesn't have any intention of doing so. Perhaps I'm mistaken?

Re: Migrating from Vue 2 to Svelte

#198

Earlier quoted context omitted.

If you want a serious answer: because frameworks do a lot of work for you. For example, they will keep state synchronised between your data model and components (and with some handy plugins, your server). They allow encapsulation and reuse through a well thought out set of abstractions. They provide functionality like routing and app-wide data stores with transactions. If you’re just building a webpage no problem, us…

I think what snowl wanted to know was more technical than that - why such new syntax is necessary to achieve those things? Why exactly the same things cannot be achieved with existing syntax? For example, it's very understandable why JSX is preferable over vue's string syntax ( ) in terms of "just use JS" argument. What exactly warrants this necessity for these weird looking and non-standard syntaxes and why it can't…

JSX is not JavaScript, so if you're using it, you're wholly in the "new syntax" camp.

Re: Migrating from Vue 2 to Svelte

#199
post #28
post #13

Solid JS is what I would have chosen. Not sure if they considered it. Best performance and dev experience with least 'magic' of all frameworks I've tried.

what do you like about the dev experience? i have a hard time seeing solid as something more than “react but faster and slightly less annoying”. still doesnt have scoped styles, animation, state mgmt, head management, etc out of the box, all minimum things i look for to be productive

For animations, the standard Web Animation API is very convenient. From what I can see, the animation library in Svelte looks pretty similar.

Re: Migrating from Vue 2 to Svelte

#200
post #91

When will mithril.js get the hype it deserves, I'm a sucker for simple tiny libraries with no dependencies and no build steps that are mature as well (6 years). I guess it doesn't have a flashy community with talks and developer advocates :/. I feel the same about htmx, another simple tiny library with no deps and no build steps. Why don't people recognize the advantage in that.

I had to use mithril once and absolutely hated it. Writing my HTML as JavaScript objects? no thanks
Post reply on HN