This content originally appeared on Bits and Pieces - Medium and was authored by Sunil Sandhu
State of JS 2021/2022: What We Learned About JavaScript Development in 2022
The State of JS survey has taken on a sort of cult status over the years, becoming a nice, graphic-driven insight for benchmarking what’s hot and what’s not in the world of JavaScript. Usually these surveys come out once per year, but we’ve had two years squashed into one, because covid.
16,085 respondents took part in the survey from every continent — and yes, that includes Antarctica!
However, when you think about just how many developers there are in the world, 16,085 is a pretty small number. Several countries in Africa didn’t appear at all, and the two most populous countries on the planet made up just 3.5% of all respondents. So take these results with a pinch of salt.
I’ll leave my thoughts on the demographic makeup of the survey at that, for now. Instead, let’s focus on the technology.
So what did we learn?
Many of the latest JavaScript features are being used (but we don’t know how)
Proxies have been used by 26.1% of respondents. The Proxy object enables you to create a proxy for another object, which can intercept and redefine fundamental operations for that object.
Dynamic Imports have been used by 48.9% of respondents. In situations where you wish to load a module conditionally or on demand, you can use a dynamic import.
Nullish Coalescing has been used by 67.2% of respondents. The nullish coalescing operator (??) is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand.
Private Fields have been used by 20.4% of respondents. Class fields are public by default, but private class members can be created by using a hash # prefix. The privacy encapsulation of these class features is enforced by JavaScript itself.
These were some that were mentioned in the survey. It’s great to see that new features are being used and that browsers are doing well to keep up.
The frustrating thing about this question was that it asked the respondent to pick between “never heard of it”, “know about it”, and “have used it”. As many developers know, there’s a difference between having used something, and having used something in production / professional environments.
I’ve tried using Proxies and Private Fields while playing around in a localhost, as a means to educate myself. But I’ve not tried implementing them in production, while working in a team of developers. The latter is what I’d be more interested in knowing about.
The survey takes the same approach with Browser APIs too.
Service Workers have been used by 45.7% of respondents. Service workers essentially act as proxy servers that sit between web applications, the browser, and the network (when available). They are intended, among other things, to enable the creation of effective offline experience.
Web Audio API has been used by 22.5% of respondents. The Web Audio API provides a powerful and versatile system for controlling audio on the Web, allowing developers to choose audio sources, add effects to audio, create audio visualizations, apply spatial effects (such as panning) and much more.
WebGL has been used by 21.6% of respondents. WebGL enables web content to use an API based on OpenGL ES 2.0 to perform 2D and 3D rendering in an HTML canvas in browsers that support it without the use of plug-ins.
WebXR has been used by 2% of respondents. WebXR is a group of standards which are used together to support rendering 3D scenes to hardware designed for presenting virtual worlds (virtual reality, or VR), or for adding graphical imagery to the real world, (augmented reality, or AR).
Library/Framework satisfaction is on a downward trend (of sorts)
React satisfaction went down from 88% to 84%. Vue.js satisfaction went down from 85% to 80%. Angular satisfaction went up from 42% to 45%. Svelte satisfaction went up from 89% to 90%. Solid appeared for the first time, achieving an initial satisfaction rates of 90%. Everything else listed (Alpine.js, Lit, Preact, Stimulus, and Ember) all had decreasing satisfaction rates.
While this data looks interesting, it doesn’t really tell you all that much. For example, the calculation made to arrive at this satisfaction is: would use again / (would use again + would not use again). So deciding whether to use again or not use again has determined developer satisfaction (similar calculations were made to determine developer usage, developer interest, and developer awareness.
Whether a developer uses a technology again does not determine how satisfied they are with it. With the exception of my yearly React vs Vue.js code comparison series, I haven’t coded with Vue.js in several years. I enjoy Vue.js though and haven’t used it simply because I’ve not had to in professional environments. I wouldn’t class that as dissatisfaction.
Developers are generally happy with the state of front end frameworks
21.2% of respondents answered ‘Very Happy’. 44.9% of respondents answered ‘Happy’. 14.1% of respondents answered ‘Neutral’. 4.5% of respondents answered either ‘Unhappy’ or ‘Very Unhappy’. 15.3% of respondents didn’t answer the question.
Developers are generally happy with the state of back end frameworks
Although we didn’t cover backend frameworks in this post, here are the results from the survey.
13.5% of respondents answered ‘Very Happy’. 36% of respondents answered ‘Happy’. 27.9% of respondents answered ‘Neutral’. 5.0% of respondents answered either ‘Unhappy’ or ‘Very Unhappy’. 17.6% of respondents didn’t answer the question.
JavaScript is moving (but we’re not sure if it’s the right direction)
22.9% of respondents agree that JavaScript is moving in the right direction. This was up by 0.6% from the last survey in 2020. 15.4% of respondents disagree that JavaScript is moving in the right direction (or rather, they feel it is moving in the wrong direction). This remained the same from the last survey. 57.5% neither agreed nor disagreed. This was down 1.1% from last year. Interestingly, more people have agreed with this since 2019, but more people have also disagreed since 2019. So it seems as though more people are jumping off of the fence about this matter.
The most interesting part of the survey: Pain Points
The question here was: Which aspect of JavaScript do you struggle with the most?
The biggest pain point for developers is managing dependencies. As a developer, this comes as no surprise to me. While the idea of dependency management can feel simple enough when you’re working on a small solo project, this can quickly turn into a nightmare when working in large scale teams. Managing dependencies in a monolith that is constantly mutated by multiple developers is more than a pain point, it’s a blocker.
Second on the list was code architecture. Again, this is a big deal. Knowing the right architecture to go with when building software can be the difference between being able to scale and not being able to. Having the right architecture at the beginning is like scaling a mountain with all the right tools, clothes, and equipment. Having the wrong architecture is like, well you can see where I’m going with this.
Closing thoughts
A lot of time and effort gets put into these surveys they create a nice time capsule of the JavaScript ecosystem for each year. Besides those listed, there are many other sections in the State of JS survey that are worth checking out. You might even notice some new technologies and tools that you hadn’t heard of before. You can find the full results of the survey at the link below:
As the survey continues to evolve, I hope they will spend more time tackling areas such as ‘JavaScript Pain Points’, along with highlighting some of the tools that help to cure them.
Solve dependency management with independent components
Just like Microservices, Microfrontends are a great way to speed-up and scale app development, with independent deployments, decoupled codebases, and autonomous teams.
OSS Tools like Bit offer a great developer experience for building component-driven Micro frontends. Build independently versioned components, collaborate, and compose applications that scale. Give it a try →
Learn more
- Building a React Component Library — The Right Way
- 7 Tools for Faster Frontend Development in 2022
- Microservices are Dead — Long Live Miniservices
State of JS 2021/2022: What We Learned About JavaScript in 2022 was originally published in Bits and Pieces on Medium, where people are continuing the conversation by highlighting and responding to this story.
This content originally appeared on Bits and Pieces - Medium and was authored by Sunil Sandhu
Sunil Sandhu | Sciencx (2022-02-22T13:27:44+00:00) State of JS 2021/2022: What We Learned About JavaScript in 2022. Retrieved from https://www.scien.cx/2022/02/22/state-of-js-2021-2022-what-we-learned-about-javascript-in-2022/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.