Live data from Hacker News

Vue.js 3

github.com

181–190 of 308 posts

Re: Vue.js 3

#181
post #178
post #172

Earlier quoted context omitted.

Modern React uses JSX which is then transformed at build time into function calls. You can write those function calls yourself, but it would be a tremendous PITA.

In this case, you could use `htm`: https://github.com/developit/htm#usage

Yeah totally. Or even use Preact by the same author which is smaller and faster than React.

Re: Vue.js 3

#182

Earlier quoted context omitted.

Why can't React do the same?

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…

React can be run from a single file from a CDN, and used without a build stage. Only catch is you don't get JSX. While by today's standard some people might consider that unacceptable, it was a fairly common way to use it when it was new (because relatively fewer teams used builds for JS back then, and JSX was far from being widely accepted).

My first year of React development was without JSX even though we DID have a build step (I was categorically against it at the time. Things changed, haha).

Re: Vue.js 3

#183
post #140

Earlier quoted context omitted.

Why can't React do the same?

I suppose it could, but there are annoyances with JSX defaults. For instance, Vue provides a method to explicitly declare your template variable delimiter syntax. Last time I looked this was requested of React, but not implemented, someone correct me if I'm wrong on that and it has come along in the last year or two. So.. lets say you wanna put some modern Javascript in some Django templates to make them look spiffy.…

React doesn't have templates, so that's a non-issue. JSX is sugar on JavaScript, but it's not a string. So template delimiters don't matter (that is, if you didn't use a build step, then it would be straight javascript functions calls)

Re: Vue.js 3

#184

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

Maybe take both for a brief spin, but my vote would be for svelte. I used vue2 about the same timeframe as you (stumbled upon it while trying to find alternatives to React or whatever) and really liked it a lot.

About a year ago I had to tackle a few new web projects so I decided to give React/Angular/etc another look... and promptly went hunting for alternatives again, and that's how I found svelte. We've got 5-6 svelte-based projects in production now and have really, really enjoyed it.

All that said, I haven't looked at vue3 in depth yet, so maybe it's amazing, I dunno. :)

Re: Vue.js 3

#185
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…

[deleted]

Re: Vue.js 3

#186
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.

i'm afraid this is pretty much plain wrong. react and svelte also support incremental adoption, and i dont know angular but i'd hazard there's a way to do it too if you bothered to ask angular devs.

what you're responding to is marketing, which Vue has done an effective job of. thats fine, but it is unfair of you to conclude "Gradual adoption is a feature / selling point not many web development frameworks can claim."

Re: Vue.js 3

#187

I was surprised to see an update to a contemporary JavaScript framework to be welcomed rather than boo’d by the average HN reader. That in itself is an accomplishment.

the appetite for a credible alternative to a Facebook project is strong. also the vue team has done a great job dripping out information over the past 2 years and building anticipation. very little surprises in this release, hence mostly celebration left. you need to go back a bit further in time to find the critical HN comments.

Re: Vue.js 3

#188
post #179

Earlier quoted context omitted.

I think what is not mentioned with any of the big SPA frameworks is the amount of time you invest in the churn between versions. After dealing with this in Angular for a number of years, I ended up going with stock JavaScript for my recent projects and could not be happier. Performance is much better. I have a better understanding of what goes into the product. And, I am not constantly dealing with a new version and…

That's really an Angular problem; React and Vue have had very few breaking changes over the years.

indeed. React 16 celebrates its 3rd birthday next week. (https://reactjs.org/blog/2017/09/26/react-v16.0.html)

Re: Vue.js 3

#189
post #95

Earlier quoted context omitted.

WTF are you talking about... so you don't consider any of these to be serious? sentry.io, Gitlab, Grammarly, Codeship, Behance

React is winning in U.S. Vue is winning in China

Angular appears to be "winning" in Germany (or all of Europe?).

Re: Vue.js 3

#190
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.

> Vue is the only one of the most popular 3 frameworks that can

I don't know if you intended it this way, but the start of this comment makes it automatically flamebait.

Discussion around release announcements can quickly turn into a flame war. Please use caution.

Post reply on HN