Still don't understand why people prefer magic templated front-end frameworks. Reading non-standard HTML just sucks. What even is "$:" or why does Vue require non-standard javascript ref("") objects...
I know you're probably asking it only rhetorically, but it's the way to mark something as reactive for the Svelte "compiler", cleverly using the existing JS label syntax.[1] [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Migrating from Vue 2 to Svelte
11–20 of 289 posts
Re: Migrating from Vue 2 to Svelte
#12Re events - You can type events in Vue with `defineEmits`: https://vuejs.org/api/sfc-script-setup.html#defineprops-defi... Re global enums - I'm not sure what the author means about global enums - anything imported into your Vue file can be used in the ` `. Re styles - Style is automatically scoped in Vue SFC files, too - I believe it was the first component framework to do this. This article and migration seems not…
Re: Migrating from Vue 2 to Svelte
#13Re: Migrating from Vue 2 to Svelte
#14Re events - You can type events in Vue with `defineEmits`: https://vuejs.org/api/sfc-script-setup.html#defineprops-defi... Re global enums - I'm not sure what the author means about global enums - anything imported into your Vue file can be used in the ` `. Re styles - Style is automatically scoped in Vue SFC files, too - I believe it was the first component framework to do this. This article and migration seems not…
-----
I agree with the rest, but how do you use imported TS enums in your template? Something like this being impossible is regularly a pain point for me:
slotProps.data.type === ArticleTypes.SomeTypeRe: Migrating from Vue 2 to Svelte
#15Re: Migrating from Vue 2 to Svelte
#16It seems worrisome that front end frameworks needs to be changed after just two years of use. Glad I'm not working with front end...
Re: Migrating from Vue 2 to Svelte
#17Solid JS is what I would have chosen. Not sure if they considered it. Best performance and dev experience with least 'magic' of all frameworks I've tried.
And as the latest and greatest omnipotent entry in it, so my guess would be theirs authors were aware of it.
/edit: thanks for pointing me to solid, it shined a lot of light to me in context of the article.
Re: Migrating from Vue 2 to Svelte
#18Re: Migrating from Vue 2 to Svelte
#19It seems worrisome that front end frameworks needs to be changed after just two years of use. Glad I'm not working with front end...
Re: Migrating from Vue 2 to Svelte
#20Has anyone worked on a very large Svelte project yet? I work on a large React app in real life, but have been learning Svelte in my off time - there are some nice aspects like the out of the box state management, the syntax and structure is a bit easier to learn than React, but my intuition is a Svelte project would become unwieldy for a very complex app (React class components that are hundreds of lines long with do…
Our documentation is all Svelte and dogfoods our own UI components. We've got dozens of pages and components here. Scale is from small to large. All open source so give it a go.
I come from a background in Angular over the last 10 years. Built several large SaaS apps and admin systems. I'd have no hesitation using Svelte in it's stead. In fact I'd probably get it done in half the time and half the code.