Live data from Hacker News

Vue.js 3

github.com

221–230 of 308 posts

Re: Vue.js 3

#221
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?

I see the confusion.

100% more of something = 2x more

120% more of something = 2.2x more

120% less of something (problem here!) = 2.2x less = 1 / 2.2 of something = 45% of something

I think the writer meant 2.2x improvement in memory usage rather than 120% less memory usage -- the word "less" used in conjunction with a percentage is confusing.

Re: Vue.js 3

#222
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?

> I am curious if he ever experience boredom working on Vue. I was curious about this too when Vue 3 overshot its release estimate and then he started working on Vite, which is a build tool.

Vite looks pretty darn neat

Re: Vue.js 3

#223
post #200
post #176

Earlier quoted context omitted.

You can do the same thing with React though, you can arbitrarily render a React root anywhere, and an arbitrary number of times on the same page. For instance, I work on an app that was originally written in Backbone / Marionette, but I was able to write generic connectors to allow us to drop in React at any point in the tree. Similarly, we can go back to Marionette / Backbone at any point in the tree. It's made grad…

React is a quite bit more all-in than Vue though. For example, an old app I'm aware of has HTML generated by JSP with its own convoluted maven build process and uses a mix of AngularJS and jQuery to hydrate client-side functionality on top of it. The development workflow is a draconian exercise in acrobatics through remote desktops and VPNs in really old laptops (because "security" and unions). Vue has similar hydrat…

Yeah I don't know about all that. We sunset it now but about a year ago we enhanced an AngularJS (1.x) with Typescript and React. It was pretty easy using r2a [1]. It was pretty much an angularjs 1 app for the most part. Then we had like 5 React tags that we built more complex components that used our GraphQL layer natively. It was pretty easy too because all we had to do was typically pass one or two arguments to them, then the r2a'd tag did the rest - all react code from there. There's also a2r [2] for anyone that needs the opposite

1 https://github.com/coatue-oss/react2angular

2 https://github.com/coatue-oss/angular2react

Re: Vue.js 3

#224
post #151

Earlier quoted context omitted.

I'm not sure about React's capability with this, but Vue can very easily run with no build stage. You can load Vue from a CDN and use a couple lines of JS to point it at a DOM element in your app. Then you can write a plain JS Vue object (what goes inside the tags in a .vue file), and all this logic will apply inside the element you pointed it at. You can also write components, although that gets a little clunky with…

I find it amusing that you are allowed to run arbitrary Javascript but can't run NodeJS on your machine. Sometimes corporate security can be a theatre.

I wish we couldn't run NodeJS, then the front end devs wouldn't run this monstrosity that takes ages to start, downloads GBs of dependencies, consumes 12 cores for minutes at a time, etc.

I exaggerate, but only slightly.

Re: Vue.js 3

#225
post #200
post #176

Earlier quoted context omitted.

You can do the same thing with React though, you can arbitrarily render a React root anywhere, and an arbitrary number of times on the same page. For instance, I work on an app that was originally written in Backbone / Marionette, but I was able to write generic connectors to allow us to drop in React at any point in the tree. Similarly, we can go back to Marionette / Backbone at any point in the tree. It's made grad…

React is a quite bit more all-in than Vue though. For example, an old app I'm aware of has HTML generated by JSP with its own convoluted maven build process and uses a mix of AngularJS and jQuery to hydrate client-side functionality on top of it. The development workflow is a draconian exercise in acrobatics through remote desktops and VPNs in really old laptops (because "security" and unions). Vue has similar hydrat…

This is also just plain false you aren’t shipping jsx and react doesn’t depend on anything but there being a stable host DOM node. It’s literally the other way around, vue uses global registration making it the only one of the three frameworks likely to give you any issue at all https://vuejs.org/v2/guide/components-registration.html

Re: Vue.js 3

#226
post #126

Vue is the only one of the most popular 3 frameworks that can easily be used on a minimal basis to sort of "spruce up" old applications by selectively adding it here and there in the templates. Seems like they should try more marketing and community outreach toward that end. Gradual adoption is a feature / selling point not many web development frameworks can claim.

Yep, this is my favorite thing about Vue.

People will respond saying you "can do this with React, too". But in practice it's not nearly as nice to do as with Vue. You need React and React DOM AND JSX to really make it practical; writing React render functions is not really what you want to do when you are adding some simple functionality to an existing web app (like form validation).

Re: Vue.js 3

#227
post #126

Vue is the only one of the most popular 3 frameworks that can easily be used on a minimal basis to sort of "spruce up" old applications by selectively adding it here and there in the templates. Seems like they should try more marketing and community outreach toward that end. Gradual adoption is a feature / selling point not many web development frameworks can claim.

Stencil, Elm and React can also be be gradually adopted as they can produce individual component, which can be mounted to a part of webpage

Re: Vue.js 3

#228
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?

From what I see, Vue.js has a very healthy commercial ecosystem. Many people seem to be making money off their community work. Be it with blogs, courses, conferences, offering plugins, UI, etc.

I think this decentralized web of incentives is more sustainable in the long run than a single corporate sponsor.

Re: Vue.js 3

#229
post #176
post #126

Vue is the only one of the most popular 3 frameworks that can easily be used on a minimal basis to sort of "spruce up" old applications by selectively adding it here and there in the templates. Seems like they should try more marketing and community outreach toward that end. Gradual adoption is a feature / selling point not many web development frameworks can claim.

You can do the same thing with React though, you can arbitrarily render a React root anywhere, and an arbitrary number of times on the same page. For instance, I work on an app that was originally written in Backbone / Marionette, but I was able to write generic connectors to allow us to drop in React at any point in the tree. Similarly, we can go back to Marionette / Backbone at any point in the tree. It's made grad…

> you can arbitrarily render a React root anywhere

I think this exact capability is what led to such strong React adoption. It's almost viral within an application. The main application that I worked on a few years ago was on Backbone / Marionette and we evaluated React by writing several small but complicated nested components, with state controlled by existing mechanisms. After liking both the flux application architecture and the ease of gradual transition, we pulled the trigger on React. It slowly ate our application from the inside out, but never forced our hand.

React isn't "lightweight" (JSX being the primary hurdle), but it is very easy to adopt incrementally!

Re: Vue.js 3

#230
post #81
post #37

I just started vue 3 and its incredible compared to my experience with react. Way to go Vue team!!!

> and its incredible compared to my experience with react Could you expand on this a little more? What is it specifically that makes it incredible compared to React, in your opinion?

The short version: state in a react app is all over the place and not as easy to reason about as its advertising claims in addition to buggy libs all over the ecosystem, vue has actually achieved sanity by focusing on developer usefulness and how applications change over time.
Post reply on HN