Live data from Hacker News

GitHub Stars !== Usage: React Is Still Blowing Vue and Angular Away

zendev.com

121–130 of 140 posts

Re: GitHub Stars !== Usage: React Is Still Blowing Vue and Angular Away

#121

Earlier quoted context omitted.

Curious how Vue users are getting by without Webpack / Parcel for Babel and maintaining 3rd party dependencies via NPM? Copying and pasting Vue components from Stack Overflow? That approach may be fine for small web pages, but for commercial applications, it's not a viable approach.

We avoid Webpack/Parcel and NPM dependencies entirely. I understand that convenience wins for most people, but it comes with a cost. Dependencies are magically stitched together with limited developer insight, arbitrary 3rd party code can make it into your production bundle on a whim, and it is far from "optimized" output. We use rollup[1] for our production bundle. We manage all 3rd party dependencies by source cont…

How do you update the dependencies when the author releases a new version? Sounds like it would be a lot of work....

Re: GitHub Stars !== Usage: React Is Still Blowing Vue and Angular Away

#122
post #86

MooTools is in wider use on the web than Angular, React, and Vue.js combined. https://w3techs.com/technologies/overview/javascript_library... It's funny, to me anyway, that this post look at the developer/development side of things rather than the end consumers of apps/sites side of things.

Isn't the survey you posted, counting the "number of pages" (which isn't exactly a good metric in the world of SPAs), even funnier by entirely looking at the development side of things?

Re: GitHub Stars !== Usage: React Is Still Blowing Vue and Angular Away

#123

Earlier quoted context omitted.

What do you mean by virtue signaling, and how should they defend their choice without virtue signaling? Is it possible that some just prefer to use something that feels closer to the W3C standards? Or is the virtue signaling about it being a facebook project, with facebook being a threat to the open web? Angular is a google project, but I've heard some say that since Evan You used to work for google it's sort of like…

Maybe I was being hyperbolic, but it could refer to any or all of the following: 1. The W3C standards convention 2. Being a product of Facebook 3. The old license being restrictive 4. Too much hype around the framework I'm positive I've seen people conjure these reasons before. I was deterred from React mainly for the third reason. When they fixed their license, I felt no need to pursue alternatives. I've played arou…

Those are all very good reasons, especially #3. It's part of React's track record and you don't have to look far to see other similarities to it. It isn't a sign of being a responsive to their userbase because they waited until the inventor of the world's most popular website publishing platform complained about it.

Re: GitHub Stars !== Usage: React Is Still Blowing Vue and Angular Away

#124

Earlier quoted context omitted.

Just to note you can use render functions and write jsx in Vue :) https://vuejs.org/v2/guide/render-function.html

But every time I ask about that, I get crickets. So who here is using JSX in Vue?

Also curious about why someone would choose Vue/JSX over React. My argument is essentially in favor of JSX, if Vue or something else uses JSX in a more interesting way or creates something better than JSX, that's cool.

Re: GitHub Stars !== Usage: React Is Still Blowing Vue and Angular Away

#125
I was thinking what is the reason that Vue have more stars than React given it is not used more (perhaps in China it is). My guess would be that it's because Vue is more community driven than React. Vue is dependent only on community while React is dependent on Facebook & community. Therefore I believe Vue community share more excitement for the project.

Re: GitHub Stars !== Usage: React Is Still Blowing Vue and Angular Away

#126

Earlier quoted context omitted.

With Vue and Angular you don't have to deal with controlled components, and you don't have to figure out how to mix JavaScript expressions with JSX expressions (sometimes it gets ugly).

In Vue and Angular you only need to figure out how to mix Javascript-like expressions with HTML-like templating language: {{ item.message }}

Pretty slick. It isn't fundamentally different from *ngFor in Angular (with let to declare the variable), but the details make it much more pleasant.

Re: GitHub Stars !== Usage: React Is Still Blowing Vue and Angular Away

#127
post #94

Earlier quoted context omitted.

that was how i felt too which was the same reason i disliked angular. but vue's templating syntax have turned out to be really enjoyable to use. it made me think how wrong i was of my initial impression of vue. you have to give it a try to understand it.

Sorry, I appreciate your enthusiasm, but I just can't imagine how shoehorning a language into XML could ever be a good idea.

thats how i felt too, and i'm now a big fan of vue. its funny how that works.

Re: GitHub Stars !== Usage: React Is Still Blowing Vue and Angular Away

#128

Earlier quoted context omitted.

Just to note you can use render functions and write jsx in Vue :) https://vuejs.org/v2/guide/render-function.html

But every time I ask about that, I get crickets. So who here is using JSX in Vue?

I did once, about 18 months ago.

A couple of problems I remember having:

- Not all features (e.g. most built in directives) work in JSX, and some 3rd party libs didn't work at all as JSX components.

- The JSX isn't a direct mapping to the object properties in `createElement`, which is how (almost?) every other flavor of JSX works. This means you don't just have to learn the the low-level `createElement` API, you also have to learn how that API maps to JSX. [1]

For example, you can't do ``, which you might expect if you just read the `createElement` docs. Instead, you have to use `` (but note that not all `domProps` actually need the prefix [2]). Likewise, event handlers use an `onEvent` camel case convention that maps to the `on` property in `createElement`, which is kinda nice because that's how you add event handlers in other JSX flavors. However, it also means that if a Vue component accepts an `onSomething` prop, you actually have to do something like `propsOnSomething` [3] in JSX, because passing just `onSomething` would convert it to `on: { something: ... }` instead of `props: { onSomething: ... }`.

Overall, when I was trying to use JSX with Vue, it very much felt like a second-class feature, tacked on primarily (if not exclusively) to help convert people from React. However, Vue's flavor of JSX doesn't seem to appreciate that the simplicity of how React maps JSX to `React.createElement` is a large part of its brilliance.

In other words, I think that Vue's flavor of JSX introduces just enough magic to make it confusing. It sacrifices consistency for haphazard ergonomics, making the experience frustrating for someone used to JSX being just an XML-like alternative syntax for `createElement` (or `h` or `m`). I think Vue's JSX would be much better if it didn't try to do any magic, and just forced people to write stuff like ` {} }} />` instead.

In the end, I gave up on using JSX with Vue, tried templates for a bit, didn't like them, and moved away from Vue altogether.

Caveat lector: Things might be a lot better now. I tried to read up a bit to see, but I didn't dig very deeply.

---

[1]: https://github.com/vuejs/babel-plugin-transform-vue-jsx#diff...

[2]: But note that not all `domProps` actually need the prefix, either: https://github.com/vuejs/babel-plugin-transform-vue-jsx/pull...

[3]: This actually used to be impossible when I was trying Vue and JSX. It was only added somewhat recently: https://github.com/vuejs/babel-plugin-transform-vue-jsx/pull...

Re: GitHub Stars !== Usage: React Is Still Blowing Vue and Angular Away

#129
I had a friend say something that I think is a pretty good way to look at it. He said: "React is the blockbuster hit at the box office, while Vue is the critics' darling"

The big question is if it's good enough to replace what's already established. Things will probably equalize eventually, but by the time Vue overtakes, if it does, there will probably be some kind of new and shinier thing that intends to replace both of them.

Re: GitHub Stars !== Usage: React Is Still Blowing Vue and Angular Away

#130
post #59

Earlier quoted context omitted.

I find the whole premise of putting the html in JavaScript bizarre and I think it is a passing fashion while the various debates around web components and shadow DOM isolation get sorted out. I would hope my graphic artist will eventually be mixing 3 layers of HTML elements that seem entirely standard to him except the 3 different sources of docs.

The only bizarre thing is the HTML was ever separate from JavaScript in the first place.

That's probably because HTML came first, and the web was meant to be a document sharing platform, not an app environment for everything under the sun. Anyway, people were mixing the PHP with their HTML long before everything got rewritten in JS. The whole argument over what constitutes proper separation of concerns probably proceeds Smalltalk and MVC.
Post reply on HN