Hacker News new | past | comments | ask | show | jobs | submit login

You'll see quotes in this thread like "The demand for both React and Vue.js is growing tremendously" thrown around. It's good to check out npm install stats to get an unopinionated comparison.

https://npm-stat.com/charts.html?package=react&package=vue&p...

In reality, React is downloaded roughly 4-5x more than angular and 7-8x more than Vue. In August so far, React has 75% market share among these three libs. Interestingly, this share has grown in August compared to both last month (July) and beginning of year (January).

While this thread and the license thread might indicate that React is dying, it's not. It's growing.

If Vue is going to be what React is today, it has quite a long way to go.




Something worth noting is that both Angular and Vue are far more script-embed-directly-into-page friendly (mostly due to templating) compared to React. Almost all React users get it from NPM, while I would expect that the proportion of Angular or Vue users who get them from NPM is lower. I've seen a lot of projects for those two run without any build system (and anecdotally, I'm pretty sure I'm not the only one who's learned Vue with just a script embed).


Perfectly said. I've used Vue for a couple of months now (a couple personal projects, experiments and some dashboards) and used Angular for ~2 years before (admittedly, mostly Angular 1), and have literally never had to start off from 'npm install', unlike react (which I used for a year or so before), where everything needed a lot of boilerplate setup.

Most devs I know start a react application by cloning some standard git repo which has a working webpack/tidyCSS/redux/some test suite etc. and then write your first line of useful code. The boilerplate is enormous!


Most Angular 1 projects I saw would start off with a Yeoman/Bower MEAN stack implementation. The boilerplate no less enormous there. I'll admit Vue is nicer about these things than either Angular or React, but Angular has tons of boiler plate.


I've used react without npm at all. Just download the react and reactdom scripts from its official site, put two <script> tags in your HTML and that's it.


Angular 1 is, but Angular 2+ is not at all. Angular's CLI is Webpack based, and leverages NPM for package management.

As for build systems vs. script includes... I think Vue is probably being used in a lot more hobby projects than npm downloads would seem to indicate...but using a build system is a stronger indicator of a professional web app and pretty much necessary for any non-trivial project.


I think this would be very likely. For instance, we are still using a bower install of angular due to rails asset pipeline that is committed into repo. Our tens builds per day that would be fetching fresh are not fetching angular for that reason.


A very large number of people use React in the same way, linking to a cdn.


Could you explain your rationale? I highly doubt that a very large number of people are hand-writing render functions... I personally gave up on React and only picked it up several months later after finding out that using it with just a script embed was exceedingly painful.


  <div id='root'></div>

  <script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react.js'></script>
  <script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react-dom.js'></script>
  <script src='https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.38/browser.min.js'></script>

  <script type='text/babel'>
    const App = () => <div>Hello World</div>;
    ReactDOM.render(<App />, document.getElementById('root'))
  </script>


A lot of people will have a bundle that they've transpiled, but use the global React object from pulling in React and ReactDOM from a CDN. Other folks will use a library that offers syntax like:

  elem.div(elem(Component, {prop: 'value'}), {className: 'foo'})
It's surprisingly common, and it's listed not too far down on the React installation page:

https://facebook.github.io/react/docs/installation.html


You can include a babel script that compiles everything on load. There's a performance hit but people do it because it's easy.

Edit: more information: https://github.com/babel/babel-standalone/blob/master/README...


Babel-standalone was put together as part of the pretty good reactjs.net .Net implementation of react, after the 'official' version of babel-in-the-browser was killed off.

It's /really/ not intended for use in prod.

.

Edit. I kinda sent off on a stream of conciseness about reactjs.net here, feel free to ignore this bit.... :D

Infact, as well made as it is and despite using reactjs.net heavily for the last couple of years, the only time i would be inclined to use it on a new app is to leverage the universal rendering, or if your react app is just freaking massive and takes forever to run a build - otherwise you may aswell just throw everything at webpack --watch via iisnode or regular 'ole vanilla node.

Then again we had to make a bunch of changes to the package itself to fully support our bundling (we don't like cassette so we made our own) and to support multiple server-side bundles, none of which are agnostic enough to warrant a PR, so upgrading reactjs.net to a more recent version is a hassle, making me slightly biased against using it ;)


The "angular" npm-package is for angular1 only though, angular from 2+ forward is located in the @angular namespace on npm. So a more correct package to compare to would be something like @angular/core, or if you want to track all versions combine angular and @angular/core.

edit: looks like angular had 1 million downloads last month and @angular/core 1.7M.


From the charts, it shows that Vue from 2016 to now well over doubled it's downloads (over 100% growth) while react's only grew by 50%.

It can be deceptive when you look at charts that list totals when what you're concerned with is growth rate.


So from 2016 to 2017, React's market share grew from 74.6% to 74.9% while Vue's market share grew from 5.4% to 9.3%.

A more accurate narrative would be that Vue is eating the dying Angular.


From the beginning of 2009 to the beginning of 2010, Chrome's market share grew from 0.2% to 6.4%, while Firefox's market share grew from 32.1% to 32.9%. Both were eating the dying IE, whose market share slipped from 60% to 50%:

https://en.wikipedia.org/wiki/Usage_share_of_web_browsers#W3...

Which one do you use now?

I remember that when Larry Page granted the Founder's Award to Chrome, there were several TGIF questions saying "Isn't it premature? Chrome's market share is only 5%, and the vast majority of web users have barely even heard of it."

Larry's response was "In my mind, Chrome has already won," and in hindsight, this is probably what he was referring to. When a large number of users are flooding into a brand new product, even though there's already an alternative that's pretty good on the market and still growing, that usually means that the new product fills some burning need or deficiency that existing alternatives don't. That comparison will continue to hold unless competitors address it. That's why investors look so heavily at growth rates: if you're growing 15x faster than your competitors, you're probably going to end up with the whole market, given enough time.


That what people said about the early growth in windows phones too.

I literally remember standing there listening a microsoft rep tell me that 'When you don't have much market share, there's always room for great growth".

...just saying, you can spin the story however you like, but the fact is that Vue currently has a reasonably insignificant market share.

Beyond that, all we can do is speculate.


More that 9% and growing at more than 100% per year doesn't seem insignificant at all. Windows phone arrived briefly at just over 3% and then immediately declined. The comparison between vue.js and windows phone doesn't make sense at all.


> As of the third quarter of 2013, Gartner reported that Windows Phone holds a worldwide market share of 3.6%, up 123% from the same period in 2012 and outpacing Android's rate of growth.

Sound familiar? (and I assure you, that 3.6% is a whole lot more than a 135k measly installs a day).

:P

That's called 'unsustainable small scale growth'; and it's what you're seeing with vue right now.

A good year over year growth of 2 or 3% is far far far more compelling than a tiny 100% growth rate from nothing to nothing.

Look at chrome's history of growth and that's what you'll see. In fact, if you look at the long term history of all three, that's what you'll see with reacts growth as well: https://npm-stat.com/charts.html?package=react&package=vue&p...

Sure, maybe vue and windows phone are different beasts and they're difficult to compare... but the comparison to chrome makes zero sense either at this point.

This '100% growth' stuff is pure hand waving nonsense. Its obviously unsustainable.

The question is, can vue turn its current trend into a sustainable consistent growth and take on react? I dunno, but I can guarantee you the answer to that question is something that no one knows at this point.


If you only look at Vue and React, you can see that there is an increase in Vue's share on the weekends.

That may not be a true leading indicator of adoption, but it is hard to argue it isn't an indicator of increased interest.


I tend to agree with this. I think the age of the monolithic front end framework is coming to an end, replaced by smaller component-centric frameworks like React, Vue, Inferno, Marko, etc.


AngularJS maybe is dying but Angular is on steady growth.


What makes you say that Angular is dying? The chart seems to show a significant grow in downloads.


Another chart worth viewing:

https://www.hntrends.com/2017/july.html?compare1=React&compa...

Hiring is a lagging indicator, but I see React hitting a plateau the way angular did. I see Vue is on the cusp of takeoff. Time will tell if it fails to launch, but I'm seeing more interest in Vue at meetups than React.

I think a lot of this has more to do with React's state management than licensing. One of the react developers said it best. Paraphrasing;

Everyone stopped saying React is fun after Redux.


> Everyone stopped saying React is fun after Redux.

From my understanding managing state is a fundamentally hard problem, and Redux just make it very explicit and avoid the confusion of a state living in multiple places.

Did not try Vue but is the state management simpler?


way simpler. it's just Redux down to it's core minimum, which is really just an abstraction layer to setting variables.


Redux's core minimum is already pretty incredibly minimal; I have a hard time imagining things much more simple than that.

react-redux, which is neither redux nor the only way to integrate redux with react, is a bit more complicated but still not very complicated.


Angular didn't hit plateau, but collapsed after ng2 was announced. React will replace angular and hit plateau just because the number of f/e jobs is limited.


Redux is completely optional, 3rd party library. So I really don't understand why anyone would say that. You don't like Redux? Don't use it.


Everything is a 3rd party library when it comes to the building complex React based app. Redux is a part of the hype train, so you are going to use it if you are on the train.


There's two mainstream options for state management right now: Redux and MobX. But even the creator of Redux says "You might not need redux" https://medium.com/@dan_abramov/you-might-not-need-redux-be4...


Right, and MobX like thing is built-in into the Vue.


Note this chart is actually showing AngularJS (1.x) only. NPM only started exposing stats for @scoped packages recently, so @angular/core (Angular 2+) only has a few months of history.

See https://npm-stat.com/charts.html?package=react&package=vue&p...


Here in NYC I have yet to see a job posting asking about Vue. It's all either React or maintaining an older Angular app.


usually it takes a few years for a new framework to take hold, since the react devs are probably still working on their projects and wont be switching in the middle of it. but in two years, who knows, you might be glad you picked up vue when you see almost everyone starting their project in vue come time being.


I don't think one should base the decision what to choose solely on "who gets more downloads".

Otherwise we would all be still using PHP instead of Python or Ruby.


I think it's going to get there. The sheer number of JavaScript developers means there's always someone out there who wants to try something new, and haven't invested in learning React yet. Doesn't hurt that contributing a meaningful library for a framework comes w/ a healthy dose of internet points.

React was in the same spot a few years ago. It went from a dark horse to the default over the past two years.


I really don't want Vue to become another React. React used to be a single </script> dependency in the browser and now it is difficult to find examples and discussions that don't require downloading npm and all these other components.


What do you have against npm install create-react-app?


Because I'm programming Rails and I don't want another ecosystem polluting the devspace for these projects. (See the unholy mess that is react-on-rails, what with bringing in v8 when Rails already uses another JS engine). I also strongly disagree with node's module culture, and prefer mature environments. The browser loads scripts, why can't that be enough?

I see React and Vue as tools for scratching very specific itches: fast DOM manipulations and databinding that actually works. React was this, then it grew and grew and grew. Vue is threatening to move away from this.

Also, still pissed that my year-and-a-half old react code is now hopelessly out of date, and requires updating (guess what, I'll be porting it to vue instead). That is bullshit.


Your year and a half old React app shouldn't be "hopelessly out of date" unless you did something very wrong.

If you want to use React with Rails, use Rails in API mode and keep the front-end separate. I'm not sure how rewriting in Vue is going to solve any of your problems at all.

"The browser loads scripts, why can't that be enough?"

Not sure what you mean by this. Whatever you use, the browser will be loading scripts.


From a Rails perspective...

Vue doesn't require nodejs to follow along with the examples

Vue doesn't prescribe to me how I should write my markup (beyond Angular-style attributes) or force me to violate separation-of-concerns.

Vue doesn't require it's stuff to be stored in $ROOT/app/assets/javascript/components, when all the rest of my code lives in $ROOT/app/whatever

Vue doesn't (or didn't) prescribe all these stupid little companion addons to do things I learned how to do (and do better) years ago

Vue doesn't give me a shitty markup language (JSX -- class vs className? Fuck off!) or even worse alternatives (its super verbose JS-DOM alternative) if I don't want (or can't) use it

Vue doesn't have nearly as large of an obnoxious, inexperienced, harebrained, and cloud-huffing crowd that will argue with me when I express distaste in it


"Vue doesn't have nearly as large of an obnoxious, inexperienced, harebrained, and cloud-huffing crowd that will argue with me when I express distaste in it"

Personal insults aren't cool.


Yikes


Indeed. There is a lot of hype around vue.js, and maybe some is even warranted, but companies and devs are almost entirely split between Angular2 and React in my experience (been hiring, so reading lots of CVs and talking to devs).

Vue.js might be better than React in some ways, but is it enough of a paradigm shift to throw away a bunch of hard earned knowledge?


This is a great point. I see Vue and I like what I see. However, the difference with React was that it was a big step up from everything that came before it. Vue is more of an evolution and not a revolution in front end dev. If it's better than React, it's marginally better...and that marginal benefit is offset by the massive ecosystem and developer mindshare that React has accrued over the years.


NPM stats are not representative at all because for every big project there are tons of NPM downloads. For every branch, every deploy, every pull request. This grows exponentially.

Just like Github stars arent representative because only (active) Github users would add a star and when a project has critical mass, the amount of actual users will no longer correlate to the amount of stars.

Anyway, I don't think there is a good way to measure usage or popularity of these frameworks. Maybe Google Trends or stackoverflow tags? I don't know really.


Google trends are particularly difficult for this case because angular (the library) is not a "topic" there. React however is, though.

Stackoverflow tags comparison here: http://imgur.com/a/O3mSB

The tool used is here: http://data.stackexchange.com/stackoverflow/query/201360/que...

I felt happy looking at this. Angular has everything (the complete package of router, speed, and all the components you need), and was surprised why react was more popular


Who's to say 99% of the downloads on npm aren't just from CI servers? Some of my side projects made it to 1000s of downloads when I was the only one using them, on various package managers.

Google trends is more useful.


Having worked for a big company, one of the things that people look for in a framework is a tech giant like Facebook supporting it. One of the reasons why people are shying away from moving to Vue is because that it's completely community driven. Think about Angular's huge initial success - it had the backing of Google


JQuery was authored by one guy. One a technology reaches certain threshold no one cares about its origins as long as it's open source.


i think we all learned that a huge company backing has no bearing to the success of the project.

just ask any ex-angular devs.


Or Adobe Flex..


Or KnockoutJS


Or YUI


What's also important is that Vue 3x'd growth while React 2x'd growth.

I grabbed a point around the middle and one near the end. React: 642K > 1,184K. Vue: 53K > 155K


npm downloads seem to exaggerate how many actual people are downloading packages rather than bots.

A funny pattern that emerges in the above chart is that downloads drop sharply on weekends. I have seen packages that exhibit the opposite pattern (downloads spike on weekends). And this pattern is correlated with popularity, the most popular packages are downloaded largely by 9-5 industry coders, and mostly via continuous integration bots.


I work in a coworking space in Seattle. Most of the startups here use React and a few Angular. Not one, that I know, uses Vue. This is a fairly large coworking space and while I don't know every company's stack, the reach of React is impressive considering it wasn't that long ago that Angular dominated.


A more interesting graph would be one that includes Angular 2+: https://npm-stat.com/charts.html?package=react&package=vue&p...


npm stats are slightly deceptive because Vue is huge in China. In China npm is very slow so most devs use mirrors to download their packages. so the * here is npm doesnt really include China, which is arguably Vue's biggest market.





Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: