Live data from Hacker News

Vue.js 3

github.com

71–80 of 308 posts

Re: Vue.js 3

#71
post #11
post #6

> Vue 3 has demonstrated significant performance improvements over Vue 2 in terms of bundle size (up to 41% lighter with tree-shaking), initial render (up to 55% faster), updates (up to 133% faster), and memory usage (up to 120% less). What does 120% less memory usage mean, really?

It's definitely not how to show that, but if you follow their link ( https://docs.google.com/spreadsheets/d/1VJFx-kQ4KjJmnpDXIEai... ), you'll see the numbers. The math is like, if it did use 100mb, and now it uses 25mb, that's 300% less, because 25mb is the "100%", and you reduced by that amount 3 times. Odd.

These "75%"/"300%" numbers are ridiculous, the two numbers are calculated completely differently. At least be consistent.

100/25-1 = +3 = 300% increase

25/100-1 = -0.92 = 92% decrease

Re: Vue.js 3

#72

i learned vue2 3-4 years ago. should i learn vue3 or svelte instead?

Depends on what you want.

I researched tech required in job offers and React was first, running circles around Angular and Vue. Nobody spoke of Svelte

Re: Vue.js 3

#73
> allows end users to shave off up to half of the runtime size via tree-shaking

Doesn’t webpack support actual tree-shaking (not just modules) or is that still a Rollup-only feature? There should be little difference in size in importing packages vs files if tree-shaking is on.

Re: Vue.js 3

#74

Can I use it by including it with a script-tag? Vue 2 was kind of possible to get up and running with a script-tag to get components in a pre-existing app.

Yes its possible

Re: Vue.js 3

#75
post #63

I am impressed with the amount of energy Evan is pouring in this open source project. I am curious if he ever experience boredom working on Vue. I am also curious if Patreon based income is sustainable for the long run. What if there's another new sexy JS framework in the future?

> What if there's another new sexy JS framework in the future? That's how a market works. It's a strong incentive to keep Vue sexy.

The market also isn't as volatile as people make it out to be. The top most used js frameworks (React, Angular and Vue) have been in the top spots for 5 to 7 years now. I guess the market might as well be settled. Of course there are some new comers every year, but they don't enjoy a large market share. Hell, I've not even seen VueJS used once in any serious project in the industry.

React and Angular are here to stay, and there's no changing that.

Re: Vue.js 3

#76
post #7

Earlier quoted context omitted.

Means writer isn't mathematically literate?

It means the writer isnt great at English. There are other languages which would use similar constructs where it wouldn’t be wrong.

Do other languages math differently?

Re: Vue.js 3

#77
post #73

> allows end users to shave off up to half of the runtime size via tree-shaking Doesn’t webpack support actual tree-shaking (not just modules) or is that still a Rollup-only feature? There should be little difference in size in importing packages vs files if tree-shaking is on.

Webpack doesn't support actual, statically checked tree shaking for now. There is a parameter called ''sideEffects'' you can employ in your package.json, which if switched to off gives hints to the compiler that your code is side-effect free and can thus be eliminated if not used.

Re: Vue.js 3

#78

Earlier quoted context omitted.

> What if there's another new sexy JS framework in the future? That's how a market works. It's a strong incentive to keep Vue sexy.

The market also isn't as volatile as people make it out to be. The top most used js frameworks (React, Angular and Vue) have been in the top spots for 5 to 7 years now. I guess the market might as well be settled. Of course there are some new comers every year, but they don't enjoy a large market share. Hell, I've not even seen VueJS used once in any serious project in the industry. React and Angular are here to stay…

GitLab uses Vue, that qualifies as a serious product.

Re: Vue.js 3

#79
post #72

i learned vue2 3-4 years ago. should i learn vue3 or svelte instead?

Depends on what you want. I researched tech required in job offers and React was first, running circles around Angular and Vue. Nobody spoke of Svelte

Where I live, VueJs isn't even mentioned in any job postings. Large companies still work with older Angular projects, new projects are more often than not done in whatever fits the need.

Re: Vue.js 3

#80
post #38

I still don't see a reason why one would use Vue or React. I agree that templating of data is something you should use a library for. But there are great templating libraries. Handlebars for example. Can someone give a short example of code that would be more elegant using Vue then just a simple template engine?

Sure, you can use HBS (or even vanilla) to render a piece of dynamic HTML. That's not really the problem these libraries are solving.

You could also create your own components with HBS templates and figure out how compose them to render a tree of components. That's not too hard to figure out either.

The problem is really in updating the DOM when state changes somewhere in your application. In the jQuery days we had tons of micro DOM managing code so that when some variable changed then we would update some piece of the DOM by "hand". But as your project grows this becomes a mess pretty quickly.

Another solution could be to simply re-render everything and update all the DOM on every frame with a state change. That would simplify your code but it would probably be extremely inefficient.

The point of libraries like Vue, React, Svelte, etc, is about simplifying the production of sophisticated UIs, as efficiently as possible, so you can focus on the right abstraction instead of the implementation details (eg: managing the DOM).

Every library takes a very different approach. If you're coming from the vanilla/jQuery world the learning curve can be pretty steep. But, as someone who has been doing web frontend for 20 years, I think the price of admission is worth it.

IMO Vue is probably the easiest one to get into. You can get started by simply including it in a script tag as if you were using jQuery.

Post reply on HN