Laurie Voss, co-founder and COO, npm, Inc.
January 3rd, 2018
It isn’t the only signal you should examine, but the popularity of a package should be an important consideration in this process. A package with a large community means there are more people who can help you with issues, whether in Slack groups, Stack Overflow, or via blog posts and tutorials. A large community will also make it much more likely that bugs will be found and fixed before you encounter them. If you’re managing a team, utilizing popular packages makes it much easier to find and hire developers who are familiar with them.
You can use npm’s download statistics to give you insight into the amount of people actively invested in using and maintaining a package. However, probably more important than absolute popularity is growth.
Packages, once incorporated into software, have very long lives. People very seldom rip packages out of software once they’re installed. Because of this very low “churn,” packages hardly ever decline in usage. Furthermore, nearly all packages in the npm Registry grow in usage as the number of total npm users continues to skyrocket. They vary only in how fast they’re growing.
This makes measuring growth harder, since measuring absolute growth in downloads all the time makes almost everything look popular. Because of this, instead of absolute growth, we look at the relative popularity of a package compared to all the other packages in the npm Registry at that time.
We get this number by looking at download counts for a package as a percentage of the download count for all packages in the registry at that time ("share of registry"). This gives us an idea of whether a package is growing faster than the Registry (increasing in popularity) or slower than the registry (becoming less popular).
Remember: because of all this explosive growth in the npm community, nearly every package in the registry is growing in terms of absolute users. The rest of this analysis is therefore focused on relative growth as a percentage of the graph above, not absolute growth. We call this metric "share of registry" in all our graphs below.
For front-end frameworks, we looked at a number of potential candidates and analyzed a few of the most popular:
Equally obvious is the massive growth in React. Introduced in March of 2013 by Facebook, React has been adopted very rapidly. Part of this is a reflection of its nature; unlike some of the other frameworks in this analysis, React isn’t a full end-to-end solution for building a web application. It’s a well-designed solution to a specific need that many applications have, and it incorporates easily with a number of alternative solutions for other parts of the application. Because of this modular nature, React has spawned a whole ecosystem of related packages that solve the problems of the other parts of an application.
We’re going to look at the whole React ecosystem in a later post, but the overall growth of React cannot be ignored. Web developers are enthusiastically adopting React, and other domains such as mobile and desktop application development are using it too.
Preact is React’s little sibling, an independently-developed drop-in replacement for React that sacrifices compatibility with older browsers for performance and size improvements. It garners a lot of developer press but its overall usage is still relatively low. However, its growth is impressive so it’s possible it will become a major force in the next few years.
Angular is a full framework — a complete solution for building a web app. Angular has two major variants, Angular 1.x (known as AngularJS) and Angular 2.x (simply called Angular). Our stats for Angular 2.x only go back 15 months. The two variants together are the second-most popular framework after React and more than twice as popular as Ember or Vue.
Ember is another full framework used in production by a variety of big companies but it has no primary corporate backer. The way Ember is packaged and distributed makes it hard to track; here we’re tracking
ember-cli-babel, but it’s easy to argue that Ember gets under-counted because npm is not the only way in which Ember is deployed and distributed. From npm’s numbers it appears that Ember is making a comeback after losing ground in 2016, but our confidence in this measurement is lower than for the other frameworks in our analysis.
Vue, built by a former Google engineer who had previously worked with Angular, is roughly level with Ember and a little less than half the size of Angular in terms of absolute popularity. Vue is growing much faster than Ember and Angular, the other two “full” frameworks, and we expect it to overtake Ember in popularity in 2018.
This graphic shows the absolute popularity of frameworks and their growth in the 12-month period from October 2016 to October 2017. The overall picture is clear:
Millions of developers at hundreds of thousands of companies depend on npm to discover, share, and reuse code to build amazing things.