Live data from Hacker News

Vue 3.2

blog.vuejs.org

11–20 of 153 posts

Re: Vue 3.2

#14
We've been pretty happy with Vue 2.6 and haven't had the motivation to take the leap.

I did try it and even though it's advertised as somewhat backward compatible it did break lots of things, which was totally expected and it's a major release.

Also we couldn't figure out a lot of things, like how can I access the $children like before, why does everything show Object proxy in console, etc. Posting on SO and forums also didn't yeild much help since everyone is still discovering it too I guess.

So in the end we decided why fix something which ain't broken for now. Vue 2 still kicks ass performance wise and is really easy to use.

Re: Vue 3.2

#15
post #5
post #3

What's advantage of VueJS over Svelte ?

https://github.com/yyx990803/vue-svelte-size-analysis

It's weird for this analysis to focus on the total size of the app. If a Svelte app has 100 components but a page only uses 10, then surely it's possible to only fetch these 10 components and defer the rest, right? This way the size of each page does not have to grow linearly with the size of the app. And the size of each page matters more than the total size of the app -- after all, we're on the web, not on mobile where users need to download the whole app before running it. Am I missing something here?

Re: Vue 3.2

#16

We've been pretty happy with Vue 2.6 and haven't had the motivation to take the leap. I did try it and even though it's advertised as somewhat backward compatible it did break lots of things, which was totally expected and it's a major release. Also we couldn't figure out a lot of things, like how can I access the $children like before, why does everything show Object proxy in console, etc. Posting on SO and forums a…

There's a migration build available which will allow you to migrate more gracefully, should you choose to change your mind. (It runs the Vue 3 runtime with Vue 2.6 + 3 APIs.)

Re: Vue 3.2

#17
is going to bring Vue closer to Svelte and solve the problems of long list of refs returned and .value's everywhere. When I checked an early draft last year I recall some limitations due to lack or inadequate support for non-setup component options, but from skimming https://v3.vuejs.org/api/sfc-script-setup.html I got the impression that most of the limitations have been ironed out. Really excited to try this out.

Edit: Actually it seems that a solution to .value's everywhere has been postponed and is currently discussed in https://github.com/vuejs/rfcs/discussions/369. The current iteration still requires unwrapping inside the script tag. The docs doesn't seem to make this clear since the examples are too simple...

Re: Vue 3.2

#18
The combination of Vue composition API and setup scripts is really awesome. It reduces a lot of boilerplate for many common scenarios.

If you are also using GraphQL, I recommend taking a look at the new composition API support in Vue Apollo [1] as well. This post [2] summarizes how this integration looks like in practice for a typescript project.

[1] https://v4.apollo.vuejs.org/guide-composable/

[2] https://lorefnon.me/2021/08/08/Vue-composition-api-and-type-...

Re: Vue 3.2

#19
post #3

What's advantage of VueJS over Svelte ?

You can use vue without npm, it has a build you can just drop in a script tag like you would with jquery.

Vue can also use the html as the component template like angulajs 1 used to allow. This makes it great for progressive enhancement and plays nice with server side based template frameworks.

Bottom line, vue scales up, but also scales down. You don't need to go full spa, you can hack a quick demo or make a one file tutorial and it's a bliss.

Also, maybe I missed it, but I don't think svelte has the concept of cached properties.

Re: Vue 3.2

#20
post #7
post #3

What's advantage of VueJS over Svelte ?

Larger community and higher adoption rate among companies. If you run into a weird issue you’re more likely to find someone who’s had the same issue and solved it. There are plenty of established best practices and patterns to follow. Good learning materials and documentation. More supporting packages and libraries - usually people build for both React and Vue, it’s rarer to see Svelte.

I've used both professionally (and React as well).

I can't stand Vue (but haven't tried newer versions).

The reason is that Vue is miserable to debug in the browser. It is really clever to use proxies for values but then you have to make an extra click to see the actual value and it really slows you down. Recreating the state of the app inside your head can't be done quickly because you have to manually evaluate everything you need to do that.

Vue also uses it's own DSL that generates a bunch of code under the hood, which confuses the browser.

These things could have changed in recent versions of Vue but I had such a poor experience that I would never go back.

I had to respond to this comment because the reason you have fewer libraries for Svelte is that Svelte is just JavaScript. It is trivial to use any JavaScript library because it requires no integration wrapper to convert that library to Svelte. Just use it as you would without Svelte. It's a much better experience than Vue or React can ever give you.

Post reply on HN