TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

State of JavaScript 2021

297 pointsby kumartarunover 3 years ago

41 comments

davedxover 3 years ago
I read this report every year. This year it feels the most like it&#x27;s driven by hype (and marketing, hi Vercel!).<p>In my professional and personal experience, react has never been better to use (in terms of features, DX, maturity, community, productivity), yet if you look at the &quot;popularity&quot; (oh dear) graph, it&#x27;s basically just describing how older tech slides down while newer shiny tech comes in and is instantly the most &quot;popular&quot;.<p>The &quot;Back end frameworks&quot; section is particularly bad. Sveltekit and Astro are not &quot;back end frameworks&quot; unless you define tech by what marketing copy people have written. Even express (which I still use daily for most of my back end projects) barely qualifies as a &quot;framework&quot; in my opinion. Again I have the feeling that choosing which techs go into this section is driven by something like &quot;github star delta&quot; rather than an evaluation of what the tech actually does.<p>Finally, jeez, angular isn&#x27;t <i>that</i> bad. Plenty of enterprises use it successfully, and for companies with .NET or Java stacks, it&#x27;s a great fit. I think almost certainly the devs at those kinds of companies are probably busy just doing their day job and not responding to &quot;state of hype mixed in with some subtle marketing by commercial companies&quot; surveys like this one has become.
评论 #30360756 未加载
评论 #30358328 未加载
评论 #30359556 未加载
评论 #30359033 未加载
评论 #30359045 未加载
评论 #30359004 未加载
评论 #30358357 未加载
评论 #30358607 未加载
评论 #30358515 未加载
评论 #30358761 未加载
评论 #30384176 未加载
评论 #30358421 未加载
评论 #30390604 未加载
评论 #30359490 未加载
评论 #30359085 未加载
评论 #30364935 未加载
评论 #30373943 未加载
评论 #30360436 未加载
nobleachover 3 years ago
&quot;Popularity contest&quot; describes the front-end community in a nutshell. I&#x27;ve been in software development since before the web was a big deal. Never have I seen any language have more &quot;high school popularity&quot; style personalities hawking whatever the &quot;best&quot; library is... without any knowledge or wisdom. Any attempt to point out why some of these technologies or approaches are a &quot;bad idea&quot; leads to massive downvote trains. The saddest part is, I could be accused of &quot;gatekeeping&quot; when I say, &quot;maybe we can learn from the past?&quot;. Nope. Yet somehow, folks with absolutely no pedigree are out there deciding what a &quot;best practice&quot; is... and immediately the &quot;community&quot; hops on board. It&#x27;s almost cultish in that way. Don&#x27;t you dare ask &quot;who decided this was best?&quot;. What qualifications does that person have to decide a &quot;best practice&quot;. You&#x27;ll be met with the name of the company where that person works... as if that means something.<p>Even still, THIS is the state of the JavaScript. None of that has to do with the language.
评论 #30360984 未加载
评论 #30368404 未加载
WAover 3 years ago
How did the participation in the survey itself develop over the years? Do people get tired to take part? I participated in the survey for several years in a row now, but this time, it was slow as heck and buggy and I almost didn&#x27;t participate because of this.<p>Futhermore, the &quot;Satisfaction&quot; chart is heavily skewed towards new stuff. I probably wouldn&#x27;t make this the default view of the charts.<p>And on a more personal note: Take the results with a grain of salt. For example, I&#x27;ve been using Ionic since 2017 and the survey shows that interest is severely declining. From my perspective, Ionic just got more stable, more polished and becomes an even more viable option to do mobile apps these days.<p>Edit: Oh man, the chart kinda fooled me. Ionic is extremely stable over the years at ~52%, but how it is displayed makes it look like the numbers go down.
评论 #30399171 未加载
nindalfover 3 years ago
Not surprised to see satisfaction drop with increase in usage for React. People feeling like they’re forced to use something because of external constraints (coworkers choices etc) are rarely satisfied with that choice.<p>That’s the fate of any tool that becomes popular enough.
评论 #30358272 未加载
评论 #30358284 未加载
searchableguyover 3 years ago
For testing, I&#x27;ve been exploring vitest which is missing from this list because jest looks unmaintained and has growing pain with typescript and esm support.<p><a href="https:&#x2F;&#x2F;vitest.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;vitest.dev&#x2F;</a><p>It&#x27;s a drop in replacement for jest. The only change you will need to make in most cases is adding an explicit import for expect, describe, and it. It works without any config with esm and typescript.<p>It&#x27;s also 5x faster in development.<p>It integrates well with vite which is the bundler I use.
评论 #30358308 未加载
评论 #30359390 未加载
评论 #30438412 未加载
评论 #30358245 未加载
cjover 3 years ago
Only 22% make above $100k? [0]<p>Those salary demographics makes me doubt the entire data set. Over 40% of respondents make less than $50k<p>[0] <a href="https:&#x2F;&#x2F;2021.stateofjs.com&#x2F;en-US&#x2F;demographics&#x2F;#yearly_salary" rel="nofollow">https:&#x2F;&#x2F;2021.stateofjs.com&#x2F;en-US&#x2F;demographics&#x2F;#yearly_salary</a><p>Edit: Only 14% of respondents are in the US, which probably explains the above.
评论 #30359142 未加载
评论 #30358619 未加载
评论 #30358600 未加载
评论 #30358610 未加载
topicseedover 3 years ago
JS and TS brought so much happiness to me for years. But I found it extremely difficult to constantly have to &quot;decide&quot; between X and Y.<p>In the backend, I went all in with Golang and oh my... Now I just code.<p>In the frontend, Svelte is a godsend. No longer need to find &quot;React-friendly&quot; libraries. Simple JS works for the most part. Not ideal but great versus React for the types of admin panels I build.
评论 #30361451 未加载
评论 #30361356 未加载
评论 #30358771 未加载
评论 #30361237 未加载
tomerkrover 3 years ago
Interested in the steady drop in satisfaction with Vue since 2018. I remember being positively impressed when I looked into it.<p>Is it simply due to more usage in actual systems causing people to dislike tools they really work with, or is the framework developing in a direction people are unhappy with?
评论 #30359827 未加载
评论 #30358608 未加载
评论 #30358156 未加载
评论 #30358244 未加载
评论 #30358159 未加载
评论 #30358617 未加载
评论 #30358336 未加载
synergy20over 3 years ago
Spent one hour to wade through all these results, here are my take away:<p><pre><code> 1. stay with Typescript 2. embrace vite, pnpm 3. keep using eslint and prettier 4. svelte is below React but *above* vue now! what a momentum. </code></pre> I&#x27;m going to checkout svelte one more time and see where it is better than vue.
评论 #30362512 未加载
etermover 3 years ago
The satisfaction vs usage of angular is astonishing, but I wonder how much of that usage is legacy angular?<p>One way to read the graph would be that there&#x27;s a lot of angular just quietly getting on with the job and it&#x27;s a solid choice, but another would be that there&#x27;s a large amount of legacy angular out there that people aren&#x27;t very happy with.
评论 #30358396 未加载
评论 #30358370 未加载
评论 #30358359 未加载
评论 #30358499 未加载
评论 #30359013 未加载
评论 #30358321 未加载
canausover 3 years ago
There seems to be a bit of animosity towards front-end development based on the comments. Particularly due to the constant change of the environment and what&#x27;s perceived as the best option.<p>But, there haven&#x27;t been calls for solutions.<p>There&#x27;s points to backend technologies not changing much. My thoughts are because the backend just doesn&#x27;t matter as much. Backends are mostly I&#x2F;O streams placed and interacted with on mega-monolithic-hardware.<p>Front-end is different in every aspect. User interaction, engine&#x2F;language constraints, client differences, and more. They all come into play. The applications you can run on the front-end currently would be alien to those writing them in the 90&#x27;s, 00&#x27;s and early 10&#x27;s.<p>Front-end has to deal with immensely more complexity than the backend, and therefore new solutions and technologies need to be made.
评论 #30363869 未加载
swyxover 3 years ago
I wrote the conclusion, and it had to be cut quite a bit for translation purposes, so here is the full text for anyone interested in high level takeaways! <a href="https:&#x2F;&#x2F;www.swyx.io&#x2F;state-of-js-2021&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.swyx.io&#x2F;state-of-js-2021&#x2F;</a>
rembrantover 3 years ago
Proxies are cool. I use them in github.com&#x2F;thebinarysearchtree&#x2F;artwork which I haven&#x27;t released. That libraries tag line is &quot;you wanted less javascript and more html, so we delivered - artwork, the 100% javascript and css front-end framework&quot;. Anyway, I use proxies when I want a bunch of divs with classnames. You just do<p><pre><code> const { container, heading } = divs; </code></pre> and then container is assigned to an HTMLDivElement &lt;div class=&quot;container&quot;&gt;&lt;&#x2F;div&gt; and the same type of thing for heading because divs is a proxy for an object with getters that can figure out the name of the variable you are destructing into and create a new element with that class name. It saves a lot of code.<p><pre><code> const container = document.createElement(&#x27;div&#x27;); container.className = &#x27;container&#x27;; const heading = document.createElement(&#x27;div&#x27;); heading.className = &#x27;heading&#x27;; </code></pre> The other way you can create elements is just with a common:<p><pre><code> const heading = span({ title: artName, innerText: whatever });</code></pre> etc so my web components have less code than react components, and run at native hand-written speed. Proxies aren&#x27;t actually slow despite what I had read via google. In fact, the proxy is a bit faster than the naive implementation because it caches the divs and cloneNodes them.<p>For the second way of creating elements (the span example), instead of creating a function for every html or svg tag, I use another proxy so you can do:<p><pre><code> const { span, h3 } = html; </code></pre> and it creates the span and h3 function dynamically. This saves me writing all the code for each tag and allows new tags to be used without me having to add them to the library.
评论 #30361633 未加载
评论 #30359612 未加载
评论 #30363327 未加载
samwillisover 3 years ago
When choosing a framework to build with now, I always look at how the project is funded and increasingly want to see a business backing it where it&#x27;s a core part of their business model. That&#x27;s what&#x27;s so appealing about Svelte, now its effectively funded by Vercel, they need it to thrive as they want people to host their Svelte app on their platform.<p>The other one with an even more explicit in its commercial support for the framework is Ionic, you know the firework will always be supported as they use it themselves for their own consulting business. I see that as a massive plus.
评论 #30359648 未加载
thomgoover 3 years ago
Does anyone know why data later was dropped from the survey? It was so included in the previous versions <a href="https:&#x2F;&#x2F;2020.stateofjs.com&#x2F;en-US&#x2F;technologies&#x2F;datalayer&#x2F;" rel="nofollow">https:&#x2F;&#x2F;2020.stateofjs.com&#x2F;en-US&#x2F;technologies&#x2F;datalayer&#x2F;</a> I&#x27;m curious if GraphQL is still growing in adoption.
jveover 3 years ago
Gulp build tool not receiving much love lately with a very strong &quot;Would not use again&quot;. Why so? <a href="https:&#x2F;&#x2F;2021.stateofjs.com&#x2F;en-US&#x2F;libraries&#x2F;build-tools&#x2F;#build_tools_experience_marimekko" rel="nofollow">https:&#x2F;&#x2F;2021.stateofjs.com&#x2F;en-US&#x2F;libraries&#x2F;build-tools&#x2F;#buil...</a>
评论 #30358627 未加载
评论 #30358338 未加载
评论 #30358178 未加载
评论 #30358107 未加载
评论 #30360011 未加载
评论 #30358824 未加载
评论 #30361158 未加载
yregover 3 years ago
Only 4.5% of respondents said that they are unhappy with the state of front end frameworks. That satisfaction level is &quot;official approval of a president in a dictatorship&quot; high.
评论 #30363310 未加载
评论 #30358838 未加载
jerrygoyalover 3 years ago
Interesting tidbits:<p>Most Adopted Features: Nullish Coalescing, Optional Chaining, Private Fields<p>Highest Satisfaction (backend frameworks): SvelteKit, Astro, Fastify<p>Highest Satisfaction (frontend frameworks): Solid, Svelte, React<p>Highest Satisfaction (mobile &amp; desktop apps): Tauri, Capacitor, Electron<p>Highest Satisfaction (build tools): Vite, esbuild, SWC<p>Highest Satisfaction (monorepo): pnpm, Turborepo, Mx
评论 #30374029 未加载
stack_framerover 3 years ago
Sadly, I won&#x27;t be responding to this survey anymore due to its data breach [0]. I appreciate the transparency of the disclosure, but you only get one chance with my data.<p>[0] <a href="https:&#x2F;&#x2F;dev.to&#x2F;sachagreif&#x2F;disclosing-a-state-of-javascriptstate-of-css-data-breach-2lg1" rel="nofollow">https:&#x2F;&#x2F;dev.to&#x2F;sachagreif&#x2F;disclosing-a-state-of-javascriptst...</a>
was_a_devover 3 years ago
Not familiar with much front-end work - can anyone give insight to what&#x27;s gone on with Ember?
评论 #30358356 未加载
评论 #30358879 未加载
评论 #30358712 未加载
评论 #30362870 未加载
tempouserover 3 years ago
As a react guy for 5 years solidjs was the only one which piqued my interest. I feel it has all the benefits of reactjs plus more.
评论 #30360675 未加载
sundarurfriendover 3 years ago
Even a slight zoom-in (110%) makes the labels on the axes overlap and become hard to read. I&#x27;m usually at 120%, and most of the text is practically unreadable at that point. Plotting is hard, let&#x27;s go shopping! (Or maybe not, in a major survey like this that happens about the language the plots are implemented in?)
wiz21cover 3 years ago
Depending on your age (guess what!) the age demographics is absolutely scary :-)
评论 #30358382 未加载
throwaway4goodover 3 years ago
Beginning of the end for Angular? Noticeable drop in relative satisfication but high usage numbers shows how hard it is to get rid of.
评论 #30358318 未加载
评论 #30358753 未加载
评论 #30358820 未加载
na_otherover 3 years ago
Could there be a conflict of interest with the pick of the year?<p>&gt; Lee Robinson, Director of Developer Relations at Vercel<p>&gt; SvelteKit is a fresh take on building for the web and has an incredibly passionate, growing community of supporters.
评论 #30362033 未加载
junonover 3 years ago
&gt; Another guaranteed scientific finding: buying our t-shirt will increase your programming skills by over 9000!<p>Okay, fellow kids.<p>This report doesn&#x27;t surprise me. The JS community has devolved into bunch of people who re-invent everything in 2-3 year cycles. It&#x27;s Silicon Valley in online clique form - and that&#x27;s coming from being both deeply intertwined in it for the better part of a decade, and working in SF big tech.<p>It&#x27;s pretty much all hype now, and the &#x27;vibes&#x27; have gotten so toxic and corporate that it&#x27;s hard to really enjoy doing FOSS for Javascript nowadays.
评论 #30361558 未加载
rk06over 3 years ago
Full version of conclusion, by swyx : <a href="https:&#x2F;&#x2F;www.swyx.io&#x2F;state-of-js-2021&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.swyx.io&#x2F;state-of-js-2021&#x2F;</a>
评论 #30359876 未加载
jimmontover 3 years ago
Deno missed the library list (it includes an extensive standard library) and I&#x27;m glad to see it in included in the runtimes and mention of new things. I just finished moving an app from Nodejs+npm to it and am finding work is quite a bit easier. Initially I&#x27;d thought it was completely missing.
Glenchover 3 years ago
Yooo lets go Svelte! I really love using it and I’m glad other people are discovering it. I’m even releasing my own SaaS boilerplate made around SvelteKit: <a href="https:&#x2F;&#x2F;sveltesaas.com" rel="nofollow">https:&#x2F;&#x2F;sveltesaas.com</a>
sylwareover 3 years ago
The problem with javascript is not javascript, it is the system interface of the software where the javacript engine is: massive and beyond sanity heavy web renderers (blink|webkit&#x2F;geeko) or very custom stuff like node-js.<p>I wonder if there is a &quot;standard&quot;, simple enough (reasonable implementation cost for very few devs) and stable in time way to call C functions of a shared library (aka &quot;libdl-ing&quot; from javascript), and use their memory objects and primitive types. We can even think of extensions for direct syscalls of various kernels.<p>How to make this &quot;generic&quot; enough? If I recall properly, python has &quot;ctype&quot;.
canyoneroover 3 years ago
Much of this discussion is about frameworks, technology and trends in JavaScript as a language.<p>However, I personally find it shocking to see such a huge disparity when reviewing the gender breakdown between male, female and non-binary <a href="https:&#x2F;&#x2F;2021.stateofjs.com&#x2F;en-US&#x2F;demographics&#x2F;#gender" rel="nofollow">https:&#x2F;&#x2F;2021.stateofjs.com&#x2F;en-US&#x2F;demographics&#x2F;#gender</a>.<p>Simply put, the JavaScript community is still not doing a good job when it comes to inclusivity. That needs to change.
lucideerover 3 years ago
&gt; <i>While we know collecting and publishing diversity data can be a sensitive issue, we do think it&#x27;s important to obtain this data to help measure and improve the survey&#x27;s efforts in terms of inclusivity and representativeness.</i><p>What are the survey makers doing to improve these efforts?<p>Don&#x27;t get me wrong, the stats are representative of a problem much broader than the remit of a small survey-maker, but still, without any follow-up referencing explicit efforts the wording seems off here.
hajileover 3 years ago
Preact was interesting to see. Loads of &quot;not interested&quot; comments, but very well liked from people who tried it.<p>It&#x27;s a library that should get more love than it does.
sgdesignover 3 years ago
Survey maintainer here, thanks for posting this!
评论 #30358343 未加载
TearsInTheRainover 3 years ago
Is there a &quot;state of ...&quot; survey for other fields? Would be super interested in crypto and ML surveys.
pier25over 3 years ago
The performance is really bad on my cheap android phone.<p>That&#x27;s really the biggest indicator of the state of js.
sylensover 3 years ago
As someone new to front-end and who will probably only be building small hobbyist stuff by myself, is the mountain climb that is mastering React worth it? From my initial look into it, it seems incredibly complex.
评论 #30358999 未加载
评论 #30358859 未加载
评论 #30360848 未加载
评论 #30359034 未加载
评论 #30360616 未加载
评论 #30358797 未加载
mwigdahlover 3 years ago
Interestingly, the site itself is built with Gatsby, which scooted into their negative&#x2F;unpopular quadrant this year and is ranked in their &quot;C&quot; tier.
ArcMexover 3 years ago
I am new to JS (solo dev). I am thinking of learning React first and once I get my feet wet, explore others like Svelte.
davidkuennenover 3 years ago
I love how the charts are being displayed!
Zababaover 3 years ago
16,085 respondents? That is not a lot. I don&#x27;t know how many people use JavaScript in general, but that&#x27;s probably at least 1 000 times that.