I'm really looking forward to the stable release of SvelteKit to use as the backend for my next project.
Introducing Svelte, and Comparing Svelte with React and Vue (2021)
21–30 of 213 posts
Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)
#22In my personal experience I spend less time creating the web front ends this way comparatively to when using "frameworks". No "compiling" is needed either, other then optional minimization.
Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)
#23Earlier quoted context omitted.
Out of curiosity, what do you find clunky about Vue's variables vs Svelte? I've been working exclusively with Vue for the last... 6 years. Since the launch of v2. So my mind is already conditioned ;-)
You don’t need to write .value’s everywhere, that’s about all. And Vue is a lot more convenient in other ways.
edit: oh nvm, we haven't upgraded our codebase to Vue 3 yet, there are a lot more ".value"'s if you click through to the Vue 3 examples in the original post.
Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)
#24I liked working with it, but I regret not waiting for 1.0 to really dive in. The breaking changes are getting annoying, with the most annoying being recently with changes to its routing. It seems like every time I make a small change and go to rebuild my sites, I'm dealing with a new headache.
Don't get me wrong, the changes are probably warranted to avoid Angular-style major version catastrophes, but for me, the draw to svelte is its ease of use. If I can't go a day without having to go digging for a fix to a breaking change, it's really not that easy to use. I'm mostly a hobbyist dev and don't have the time to keep up with it.
Also, the new folder-based routing is clunky as hell. I'll probably spend some time learning Next.js for future projects. Its ecosystem most likely trumps the syntactic supremacy of svelte currently. That said, I don't doubt svelte will introduce something that reels me back in again in the future.
Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)
#25One (sort of accidental I assume) selling point of Svelte that wasn't mentioned here is that the stack trace is legible. Working with this framework I found that it was very easy for me to trace back to where the change that caused the error happened. You don't get this in most frameworks, which hide everything under layers of event handlers, schedulers and whatnot.
Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)
#26Earlier quoted context omitted.
You don’t need to write .value’s everywhere, that’s about all. And Vue is a lot more convenient in other ways.
Do you mean .value when writing a component that's some sort of form field? How do you refer to that value in Svelte components? edit: oh nvm, we haven't upgraded our codebase to Vue 3 yet, there are a lot more ".value"'s if you click through to the Vue 3 examples in the original post.
Since vue does not hide the fact that something is a ref, you need to call `myRef.value` to get to the underlying value of `const myRef = ref(10)`.
In a new and currently experimental syntax, you can use `const myRef = $ref(10)`, at which point you can just use `myRef` directly. This will then be converted by the Vue SFC compiler.
Another option is to use a reactive object as the state: `const state = reactive({ myVal: 10 })`, at which point you can just use `state.myVal`.
Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)
#27Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)
#28Earlier quoted context omitted.
You don’t need to write .value’s everywhere, that’s about all. And Vue is a lot more convenient in other ways.
Do you mean .value when writing a component that's some sort of form field? How do you refer to that value in Svelte components? edit: oh nvm, we haven't upgraded our codebase to Vue 3 yet, there are a lot more ".value"'s if you click through to the Vue 3 examples in the original post.
In svelte, top level variables are automatically reactive.
Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)
#29I'd really like to hear more from Svelte devs about what non-happy paths look like. I specialise in React.js and there are any number of escape hatches to make sure you can get something working just the way you want. What I fear about Svelte is getting to 95% complete and finding the one obscure thing a stakeholder will not budge on is not possible.
Re: Introducing Svelte, and Comparing Svelte with React and Vue (2021)
#30I work with React (Next.js) on my main project and while I don't appreciate some things generally I haven't had any issues and Next.js in particular has been great. I also find JSX stellar. I used Vue from 0.12 until around ~2.5, I really liked it at the beginning (coming from a jQuery only world) but I was forced into learning React for React Native and then I kind of standardized on it for a while and Vue fell off.…
Want to only allow a specific http method for this route? Have fun adding boilerplate.
Want to throw a specific http error like 403? Have fun writing this by hand.
It also lacks schema validation (I’d love to see ajv here) and openapi gen. You have to write everything. by. yourself.