The StateOfJS 2021 State of JavaScript Survey reports that JavaScript is in a much better state than it was in 2016. When the first State of JS survey was conducted, TypeScript usage was only 21%; today it is 69%. This is followed by Elm at 2.4 percent, Flow at 1.7 percent, and CoffeeScript at 1.4 percent.

The report was actually delayed to 2022 due to the large number of matters in 2021. A total of 16,085 respondents participated in this year’s survey; English was used by 70.1% of respondents, followed by Spanish (5.4%), Russian (5%), French (3.3%), German (2.3%), and Simplified Chinese (1.3%). The percentage of people who came from a college background was 42.6%; 22% of respondents earned between $50k and $100k per year. Approximately 71.3 percent of respondents were identified as male, while 4 percent were female.

2021 State of JavaScript Survey

JavaScript may be evolving quickly, but JavaScript developers appear to be evolving even faster, as many of the relatively new features are already showing high adoption rates. The report breaks down JavaScript features into language, browser API, and other features. The chart below shows the adoption rate for each feature based on the categories; the size of the outer circle represents the number of users who are aware of the feature, and the size of the inner circle represents the number of users who actually use the feature.

2021 State of JavaScript Survey

Among them, Optional Chaining has the highest usage rate with 91.4%. Nullish Coalescing (77.9%), WebSocket (69.3%), and Progressive Web App (64.4%) are the next most used technologies.

The JavaScript 2021 Big Survey represents the evolution of each JavaScript technology over the years in a quadrant chart. Each line is used from 2016 to 2020. Higher scores mean more people are using the technology; and scores on the right mean more users want to learn it, or have used it and will use it again.

2021 State of JavaScript Survey

Among them, Webpack, Express, React, tsc CLT and Jest are all in a state of flux, not only for the current users, but also for many developers who want to learn the technology.

1. The current state of JavaScript - front-end frameworks**

React and Vue have been the main JavaScript frameworks for six years in a row, with 80% and 51% usage respectively; Angular also has a 54% usage rate. But all three are lacking in satisfaction; Angula continues to fall in the satisfaction rankings, dropping to second to last, with Ember coming in last. On the contrary, Solid, a rising star, ranks first in terms of satisfaction, reaching 90%.

2021 State of JavaScript Survey

2. The current state of JavaScript - Backend Frameworks (Server Side)**

The backend framework space is largely unchanged. express, the dominant backend framework, continues to gain momentum, and Next.js is slowly evolving. In terms of satisfaction, new technologies SvelteKit, Astro, and Fastify lead the way with scores above 90%, while Gatsby’s satisfaction has dropped from 89% to 51% in just over two years.

2021 State of JavaScript Survey

3. The current state of JavaScript - Testing**

Jest tops the list of most commonly used unit testing frameworks with 73% usage; however, newer tools such as Testing Library and Vitest are not far behind, with satisfaction ranking first and second.

2021 State of JavaScript Survey

4. The current state of JavaScript - Mobile and Desktop**

Electron remains the most widely used tool, and React Native is the second most used tool for native application development. As in other areas, the emerging technologies Tauri and Capacitor continue to have the highest satisfaction rates. Cordova, the third most used, is the least popular, with satisfaction dropping to the bottom of the list year after year.

5. The current state of JavaScript - The Build Tool**

The report says that 2021 could be the year of Vite. not only did Vite debut with a 98 percent satisfaction rating, but in its first year it has already reached 30 percent usage, surpassing even esbuild. esbuild is only two years old, but it also has a 26 percent adoption rate, up 20.1 percent from last year.

“Vite isn’t the only tool trying to improve the state of JavaScript build tools – eight of the 12 we’re tracking today are less than two years old.”

2021 State of JavaScript Survey

6. The current state of JavaScript - Monorepo Tools**

This survey also presents data on monorepo tools for the first time. Of these, pnpm, Turborepo, and Nx had the highest levels of satisfaction, with Lerna and Rush having the lowest. Respondents were most interested in Turborepo and Nx; however, usage was essentially the opposite, with Lerna and Yarn Workspaces tied for first at 25%.

Officials say there is still a lot of work to be done.

2021 State of JavaScript Survey

Other findings include:

  • WebAssembly is already used by 15.6% of respondents, compared to 10.5% last year and 7.2% in 2019.
  • Node.js is the most commonly used JavaScript runtime, at 71.5%.
  • Python topped the list of other languages used by participants at 24.8 percent. It was followed by PHP at 19 percent and Java at 15.1 percent.
  • The percentage of respondents who believe JavaScript is growing too fast is 38%, down from 59% six years ago.

Full Report Available : The State of Javascript 2021