News for hackers. Stuff that matters.
Re:Migrating from Vue 2 to Svelte by KronisLV on Friday December 02, 2022 @04:23AM (#33828456)
Note: used Vue 2 and 3 with JavaScript instead of TypeScript, so cannot comment on the latter.

Personally, I rather enjoy the <script setup> 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 by cies on Friday December 02, 2022 @04:31AM (#33828501)
> 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 by yakshaving_jgt on Friday December 02, 2022 @10:47AM (#33832062)
Wise choice, but it brings along with it the curse of Plato’s Cave.
Re:Migrating from Vue 2 to Svelte by cies on Monday December 05, 2022 @04:37AM (#33863392)
To some a curse, to some enlightenment. :)
Re:Migrating from Vue 2 to Svelte by nov21b on Friday December 02, 2022 @07:19AM (#33829579)
In my experience React + TypeScript is a match made in heaven. You are basically writing pure TypeScript in TSX.
Re:Migrating from Vue 2 to Svelte by latchkey on Friday December 02, 2022 @11:52AM (#33833023)
It certainly isn't bad and is my first choice. But, do you have a deep understanding of how React's rendering model works in all edge cases? Because that part really isn't heaven for me. Feels more like trying to navigate a minefield.
Re:Migrating from Vue 2 to Svelte by nov21b on Friday December 02, 2022 @01:21PM (#33834481)
I don't and can see how in edge case scenario's one can run into discrepancies between Reacts typings and advanced edge case workarounds. Especially since React itself isn't written in TypeScript.