The State of JavaScript Frameworks, 2017

Laurie Voss, co-founder and COO, npm, Inc.
January 3rd, 2018

Part 2: The React Ecosystem »

Part 1: Front-End Frameworks

Update: An earlier version of this post did not include data for Angular 2.x. It has been updated to reflect this data.

 

A disclaimer: Why popularity doesn’t matter

This is an exploration of one particular metric and what it can tell us.

It’s not our intention to suggest that everyone should always use the most popular framework. There are many metrics to help you decide which one to use, and frameworks vary enormously in scope and application. A framework that closely matches your specific application may not even be mentioned in this analysis but will still be the perfect framework for you.

Introduction: Why popularity does matter

One of npm’s primary functions in the JavaScript community is to help people discover libraries and frameworks in the npm Registry that will meet their needs. Our powerful search helps find a set of relevant packages, and built-in documentation and usage statistics help people decide which one to use. An important part of the selection process is assessing the ongoing support for a project: is it actively maintained, and is there a big enough community to sustain it going forward?

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).

The full registry

rolling 28-day downloads of the npm Registry

The sum of all the package downloads in the npm Registry shows that the npm ecosystem continues to experience explosive, continuous growth. (The notches in this graph are the Christmas/New Year break, which turns out to be a nearly universal holiday for JavaScript developers).

JavaScript is getting more popular all the time, and npm is being adopted by an ever greater percentage of the JavaScript community.

Right now, we estimate about 75% of all JavaScript developers use npm, and that number is rising quickly to reach 100%. We believe there are about 10 million npm users right now.

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.

Front-end frameworks

major front-end frameworks as a share of the npm Registry

For front-end frameworks, we looked at a number of potential candidates and analyzed a few of the most popular:

  1. Backbone
  2. React (and Preact, a closely related spin-off)
  3. Angular
  4. Ember
  5. Vue

Backbone

Backbone as a share of the npm, Inc. Registry

Backbone was one of the earliest true frameworks for rich JavaScript web applications and as a result it dominated the registry 5 years ago, peaking at nearly 1% of all registry downloads. Since then it has declined steeply, but because of the long shelf-life of existing projects, it is taking a long time for usage to drop away entirely. It still gets 750,000 downloads a month which is a substantial amount of usage. Its decline suggests this usage is mostly by legacy applications.

React

React as a share of the npm, Inc. Registry

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

Preact as a share of the npm, Inc. Registry

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

Angular as a share of the npm, Inc. Registry

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.

Built and maintained primarily by Google, Angular is sustaining its popularity relative to the registry (therefore growing quickly in terms of absolute usage) but not growing relative to JavaScript as a whole. Angular 1.x is understandably in slow decline, and Angular 2.x is picking up some of these users. However, Angular as a whole is showing only modest growth. In the last year its share of registry essentially did not change. A package with this growth curve might not ordinarily seem a good choice for a new project, but its sizable community and Google’s enormous resources and continued backing mean it can be depended upon to stick around.

Ember

Ember as a share of the npm, Inc. Registry

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

Vue as a share of the npm, Inc. Registry

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.

Front-end framework growth, 2017

front-end framework growth, 2017

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:

  • Preact is tiny but the fastest-growing.
  • Vue is also very fast growing, neck and neck with Ember and Backbone.
  • Ember has grown more popular in the last 12 months.
  • Backbone has declined in popularity.
  • Angular’s popularity has stayed about the same as users shift from 1.x to 2.x.
  • jQuery remains hugely popular but decreasingly so.
  • React is both huge and very fast-growing for its size.

Up next


Take us to work

Millions of developers at hundreds of thousands of companies depend on npm to discover, share, and reuse code to build amazing things.