Time for a very naive question. As somebody looking for a more effcient (less re-rendering) and nicer DX (template based, stuff like exit animations) alternative to React, what actually makes Svelte measurably better than Vue? On first (and very naive) look the two seem pretty similar, with the biggest difference being that Vue seems to have the much bigger ecosystem and more mature tooling (I keep hearing about Svel…
Svelte 4
221–227 of 227 posts
Re: Svelte 4
#222Earlier quoted context omitted.
But Svelte obviously doesn't play well with TypeScript, and is kind of its own language - you don't need a source for that. Good luck e.g. getting reactive declarations to play well with TS's type narrowing or null analysis.
you clearly don't know what you are talking about. reactive declarations do not change the type of the objects. it just that they can rerun when the dependencies change. sure for the convenience of the users you do not need to type `let vars...` for every new variable declared in the reactive statement, but no one forbid you to write it before hand, or let the language server/plugin do it for you. but Svelte indeed d…
> you clearly don't know what you are talking about.
huh?
Re: Svelte 4
#223Curious as to people’s experience with Svelte (or SvelteKit) for making so-called “native” apps via Electron/Taurus/etc? (I believe the new 1Password app is powered by Svelte.)
We did a pretty big one, integrated with a python/gtk app [yikes]. Anyways, svelte is a joy to work with, also on the note of libraries, svelte's community is smaller but I found by far my favourite component system I've ever used - https://carbon-components-svelte.onrender.com/ .. surprising coming from IBM, but hey, I'll take it. But in general electron was a pain, slow builds - had an adhoc solution for the svelte…
Re: Svelte 4
#224Earlier quoted context omitted.
The VDOM was never about performance problems with the actual dom. It was always slower as you still have to mutate the actual DOM. The "VDOM if faster" was always FUD. The VDOM was invited to prevent bugs by removing the difficult of managing fine grade DOM mutations. Technically you are doing more work with a VDOM and diffing, than carefully mutating the DOM, it's slower. Of course if you just threw away the whole…
It was not FUD. It’s not faster than carefully mutating the DOM, but back then, almost no one was “carefully mutating the DOM” all the time. It was a shit-show of ad hoc re-rendering strategies that often re-rendered excessively because no one has time to do it carefully for every case. For most common use cases, VDOM had great performance with little cognitive overhead.
What VDOM made easier (in terms of performance) was memoization, you could get faster if you carefully evaluated your dependencies, but to be fair, it introduced many edge-cases and many people avoid memoization to this day.
VDOM also made react-native possible, and it made cross-browser programming bearable (but other frameworks at the time did that too)
Now, one REALLY COOL thing about VDOM is fragments, because being able to render multiple elements from one component, makes certain layouts very easy using plain CSS - either with simple > * or even with CSS GRID.
I am not sure, if Svelte 4 can do that, but it's very simple thing to do with VDOM. And it certainly was not common feature for a very long time.
Re: Svelte 4
#225Time for a very naive question. As somebody looking for a more effcient (less re-rendering) and nicer DX (template based, stuff like exit animations) alternative to React, what actually makes Svelte measurably better than Vue? On first (and very naive) look the two seem pretty similar, with the biggest difference being that Vue seems to have the much bigger ecosystem and more mature tooling (I keep hearing about Svel…
Vue 3 is kind of dead. Almost no features in the last year. Look at the GitHub repo, little activity, mostly maintenance stuff. I suspect author (Evan) lost interest, given the Vue 2/3 situation (similar to Python 2/3) and the lost battle against React.
Re: Svelte 4
#226At the moment I am testing SolidJs and Svelte for a small side project and feel that SolidJs is slightly superior but Svelte will win.
Re: Svelte 4
#227One of the platforms I built before used jquery and bootstrap, while it obviously do the job but I was looking to revamp the whole UI, svelte was one of the options as it’s close to vanilla js, react is troublesome unless you enjoy your app breaks next time you update it. The only thing I’m looking for, is there any component based svelte UI I can choose from and quickly build my UI, similar to bootstrap if that make…