Svelte, you can learn in an afternoon. Have migrated Angular 1.X and Angular 6.* to Svelte in the past.
I would say you can equally learn the core of Vue and React in a day, so that you’re actually building your app before the day has finished.
Migrating from Vue 2 to Svelte
171–180 of 289 posts
Re: Migrating from Vue 2 to Svelte
#172Re: Migrating from Vue 2 to Svelte
#173Re: Migrating from Vue 2 to Svelte
#174As someone who switched from Vue 2 to React around when hooks were introduced, can someone explain to me why they like non-React frameworks? Based on my experience, they all have some drawbacks: - Template languages instead of JS. If I want to perform some operation, I have to use their if and for constructs in their unique template language. In React I can just write JS. - Due to the above, TypeScript support is oft…
-templating language:
First, Jsx is also a templating language. Second, Vue & svelte templates are html super set. So you can leverage your existing html skills. Vue allows you to use pug (and any other html compilation language). Templates also enable performance optimisations while jsx don’t. Jsx is more powerful construct, hence Vue supports it.
- weird plugin architecture. All plugin architecture are weird. You can choose to not use plugins or write one. But they exist so for convenience of users
- weird way of writing code. An object inside script of sfc. And SFCs
Your mileage may vary. I prefer vue sfc. Especially because it is html like syntax and makes sense to me. If you prefer separate files, you can split html/js/css to separate files and link via src attribute
- signals and two way data binding
Vue has unidirectional flow. And two way binding is just syntax sugar for form inputs. And it is very good, if you have used react form, then you know what I am talking about
- network effect is real
It is real. And nothing can be done about it. :(
Re: Migrating from Vue 2 to Svelte
#175This "metric" and the results leading towards are so misleading. What is their setting? Their context?
> The number of developers: Two front-end developers worked full-time for two weeks alongside another developer who worked full-time for one week, so that's three developers involved
Ok, a fairly small team with a small app.
It is ok for me, if business allows for this migration. Small team, needs fun. The write-up is ok.
However, as a general reminder: take context into account. These comparisons never include teams size.
React is dominated by 1 person projects, if you follow the tutorials. I work in enterprise context, where I am leading 100+ devs and would always, always opt for Angular, since it is opinionated.
Re: Migrating from Vue 2 to Svelte
#176> frameworks' retention ratios (would use again / (would use again) This "metric" and the results leading towards are so misleading. What is their setting? Their context? > The number of developers: Two front-end developers worked full-time for two weeks alongside another developer who worked full-time for one week, so that's three developers involved Ok, a fairly small team with a small app. It is ok for me, if busi…
Re: Migrating from Vue 2 to Svelte
#177Earlier quoted context omitted.
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
Come on, why even ask this, you already know the answer.
Writing frameworks (or text editors, or...) is fun, and the original dev will be long gone when the warts of the framework become obvious and drag down the project (5+ years from the initial launch date).
Re: Migrating from Vue 2 to Svelte
#178Earlier 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…
Re: Migrating from Vue 2 to Svelte
#179Not sure what they mean by "typed events: vue 3: no". It's possible, I did it today. Here's the doc: - Typed component emits: https://vuejs.org/guide/typescript/composition-api.html#typi... - Typing event handlers: https://vuejs.org/guide/typescript/composition-api.html#typi...
Re: Migrating from Vue 2 to Svelte
#180Svelte & 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…
Yeah same. My convoluted Vue 2 and React projects are much smaller and easier organized / maintainable as rewritten in Svelte vs. Vue 2. Until Svelte and Kit becomes difficult, slow, or hard to use, I'll keep using it. No need to switch to another at this point. I'm even using Kit to build out simple REST API endpoints, it's so simple.
YUP. SvelteKit is one of the things that made me throw out my 3 tier (3 repo) project boilerplate. I mean I always knew I was slowing myself down (I'd look out the window and see all the Rails kids frolicking wild and free, not a care in the world), but I just didn't feel like I could trust my API code to Nuxt for some reason. I don't know what it was. Nuxt 3 is much better since they explicitly call out API routes but...
SvelteKit properly making space for API endpoints and being so light that I felt I could just pop a few endpoints in there and it absolutely broke that barrier for me. Now I quite often mix back and frontend, and even streaming endpoints are fine too (they added support for streaming responses).