Earlier quoted context omitted.
"cleverly"
It is clever. It’s just a named label with the name “$”. It’s perfectly standard JavaScript, and it’s super easy to remember.
Migrating from Vue 2 to Svelte
221–230 of 289 posts
Re: Migrating from Vue 2 to Svelte
#222The very first paragraph leads me to believe this is just a rewrite into svelte for the sake of it - I get it, Svelte is the new hotness on the FE-js-block, but this entire post stinks of "someone on the dev team advocated and fluffed enough figures to convince us. So now we're going to tell you why it was the right choice!" I say all this pretty confidently as someone currently maintaining a massive legacy vue2 app…
> Vue 3 is great, I highly recommend reacty-folks or frontend devs try it. We wanted the larger ecosystem (and boo to us for not being brave enough to support the growing vuecosystem). I enjoy Vue 3 and I don't enjoy React, but like you this is the reason I keep heading back to React. From tldraw [1] to react-flow [2] to the superb AtlasKit [3] to form builders & validators, the React ecosystem contains great stuff t…
Re: Migrating from Vue 2 to Svelte
#223The very first paragraph leads me to believe this is just a rewrite into svelte for the sake of it - I get it, Svelte is the new hotness on the FE-js-block, but this entire post stinks of "someone on the dev team advocated and fluffed enough figures to convince us. So now we're going to tell you why it was the right choice!" I say all this pretty confidently as someone currently maintaining a massive legacy vue2 app…
It's a little risky, but not particularly so.
But I agree that vue3 is usually a much better migration path from vue2. Also, it seems outright bonkers to me to give major weight to the "State of JS" survey, and doubly so since the delta is small.
Re: Migrating from Vue 2 to Svelte
#224Earlier quoted context omitted.
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.
{{ todo.name }}
Genuinely, do developers have the option to "just use JS" here (for looping and conditional)? I personally think this Vue example is very inferior to JS and I see it as an unnecessary complexity unless this "weird string magic" is what enables some nice-to-have feature which is not possible with plain JS.Re: Migrating from Vue 2 to Svelte
#225Earlier quoted context omitted.
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…
> 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
#226echos many of the same things i loved about svelte when i got involved in 2019: https://www.swyx.io/svelte-why people always call out the small community to be a downside, so a few of us started Svelte Society to fix that (very humble numbers compared to react, Rethinking Reactivity is probably the best starting point for most https://youtu.be/AdNJ3fydeao ). i actually think theres a “be careful what you wish for” as…
I find a lot of Svelte users are pretty religious and hysterically anti-React. When the first version of Svelte Query was announced, people were trashing the API because it looked like hooks and "you don't need those in Svelte", concluding the library must be useless. There's a lot of the "Svelte is the one true way" talk, similar to when Vue was the main alternative to React. The core team seem very reasonable but I…
And I agree with you. Rich has strong opinions and he likes to stir some discussion. And that's fine, he always responds with nuance and mutual respect. Problem is when community parrots his one liners. If I had a nickel for everytime I got yelled with "vdom is pure overhead!" or "jsx is an abomination, my templates are pure html".
In the end I'm not even sure if it is something specific about Svelte, or just any non-react solution has to bash React loudly.
Re: Migrating from Vue 2 to Svelte
#227As someone who has helped a few companies change frameworks I can say with confidence that it all boils down to developer adhesion within the product teams more than anything the frameworks have to offer. If a few people don't get over their own personal biases they are likely to drag development time down even unintentionally, and the performance of the application will suffer from more shortcuts being made. A well…
They state sveltekit is feature complete and there are no more planned breaking changes before 1.0. I think you can use it now, with relatively low risk.
Re: Migrating from Vue 2 to Svelte
#228Earlier quoted context omitted.
I was looking at the svelte-query PRs recently, and I didn't see anything that looked like "trashing". I agree that if you want to keep the patterns that make React-query so amazing, but apply them in Svelte, you should use idioms that make sense in Svelte. The exact syntax (`useQuery` and friends) isn't the point, and the `use[A-Z].*` naming convention actually communicates that you're hooking into the React lifecyc…
This could have been a year ago at this stage. It was on r/svelte, if I recall correctly. Svelte doesn't have idioms for reusable reactive logic. The $ sign is used to drive functionality in Svelte, so you can't use it to signify something observable like with RXJS. For Solid, they use createQuery because that is the convention in Solid. For Vue and Svelte, they stick with useQuery. I think the idea is that useX is j…
The problem with "useX" isn't an anti-react one, it's that "use" is an actual thing in Svelte, it's called an action! https://svelte.dev/docs#template-syntax-element-directives-u... :)
Re: Migrating from Vue 2 to Svelte
#229It's ridiculous to me to read that for some people it is desired to have CSS, JS, and HTML in the same file. I would never consider it an improvement.
IIRC, Vue allows you to move link to a separate html,css and js file from vue sfc file should you want it
Re: Migrating from Vue 2 to Svelte
#230Earlier quoted context omitted.
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)
Overall though regular .ts code works well. We use it for all our API definitions and networking layer, and it’s been 1000x better than our former version built with jinja/jQuery.