9 ms·
State of JavaScript 2022
- kreetx 4y agoNo-one uses vanilla JavaScript anymore and everyone is on TypeScript? https://2022.stateofjs.com/en-US/other-tools/#javascript_flavors https://2022.stateofjs.com/en-US/other-tools/#javascript_fla...
- spiffytech 4y ago> Languages that compile to JavaScript So that graphic excludes JavaScript itself. But to your point, I get the impression every project is adopting TS in some form. It's now pretty rare for me to find an NPM library that doesn't have typings, and anecdotally I'd say at least half are provided by the project. And I've seen a lot of "migrated to TS" in project changelogs.
- kreetx 4y agoThere is a second tab for other answers, where you do find both (though few) "Vanilla JavaScript" and "JavaScript" answres. I think they should have had it in the main selection as - at least to me - sounds improbable that really so few use vanilla JS these days.
- dmitriid 4y agoTo misquote the author of Solid.js as I remember it: --- start misquote --- There's no wonder react has been popular for all this time. We needed a time of relative stability and gradual evolution. We don't need revolutions every year. It gave time to think about hard problems, and come up with new solutions. There's intensive work being done right now on things like proper partial hydration, SSR, granular reactivity etc. --- end misquote --- This is partly reflected in the graphs as well: react dominates, but "new kids on the block" like Svelte and Solid have insane rates of interest and retention.
- dmitriid 4y agoTo keep beating the same tired old drum: despite literally hundreds of millions of dollars poured into development and promotion of Web Components... the results are at best meh. The two leading frameworks, Lit and Stencil, see very little interest, so-so retention, and barely any usage. None of the major frameworks and barely any of the newcomers use them... well, for anything. (Of course the person responsible for them tries to downplay it because biased etc. https://toot.cafe/@slightlyoff/109669688324474159 https://toot.cafe/@slightlyoff/109669688324474159 )
- cudgy 4y ago“React might not have all the answers after all” Let the newest, slickest, shiniest batch of Javascript web frameworks commence! Oh boy.
- leidenfrost 4y agoOn the other side, I wish the babel tower of javascript stacks collapses under its own weight so we can stop normalizing 50mb of download and 2gbs of ram used for a front end. Maybe something that compiles to wasm? Idk
- dmitriid 4y agoSo now you'll download megabytes of wasm. Because the browser has very little of what you need, and you need to bring all your world with you, all the time: https://news.ycombinator.com/item?id=34218520 https://news.ycombinator.com/item?id=34218520
- heavyset_go 4y agoI know it's cliche, but there are Rust frontend frameworks that compile down to WASM.
- whatshisface 4y agoApline.js is pretty nice for that.
- kaba0 4y agoWasm can’t really do DOM manipulations without JS interop, so that would just further the issue.
- kitsunesoba 4y agoIt probably won't happen but what I'd really like to see is for browsers to be a bit more "batteries included" when it comes to UI so devs feel it less necessary to build leaning towers of JS. In fact I think it should be a bigger priority than a lot of the things that've been focal points in the web standards space recently… it feels silly that one needs to pull in a third party lib or roll your own for something as basic as a sortable table.
- k__ 4y agoThe graphs get worse every year.
- awb 4y agoLibraries -> Changes Over Time is particularly hard to read
- mirekrusin 4y agoIt’s a great visualisation but could be 3d with time as depth, not brightness.
- bee_rider 4y agoI’ve for some reason started reading the headline “the state of X” as a sort of world-weary “the absolute state of X.”
- deleted 4y ago[deleted]
- sgdesign 4y agoLead survey maintainer here; we are aware of the problem and are working on a new data visualization that will use historical data to highlight how bad the graphs are getting year over year, so we can really narrow down the issue.
- thrdbndndn 4y agoI knew the field is predominantly male but only 5.2% women? Wow. I'm curious: is it worse or better in real world? Edit: fix the number to use "% of question respondents".
- heavyset_go 4y agoI worked for companies/clients where there were teams of all men and, in the case of smaller organizations, literally only men worked there. I don't think it's as extreme as ~5%, though.
- deleted 4y ago[deleted]
- SamoyedFurFluff 4y agoWdym real world? Stack overflows 2021 developer survey says broadly it’s 5.31% of respondents identified as women. https://insights.stackoverflow.com/survey/2021#demographics-gender https://insights.stackoverflow.com/survey/2021#demographics-...
- thrdbndndn 4y ago> Wdym real world Means that this survey may not be as representative. But with the info you gave, it might be.
- heavyset_go 4y agoI definitely wouldn't consider StackOverflow users to be a representative sample of people working in software development/tech/etc.
- vagrantJin 4y ago> knew the field is predominantly male > only 5.2% women? You answered your own question though. There is no magical answer. What is curious though is why you think any of that matters. Its like saying: I know zebras have stripes but do zebras have stripes only?
- ilrwbwrkhv 4y ago[flagged]
- deleted 4y ago[deleted]
- factorialboy 4y agoHad the same response, but would have said "Django" not "Rails". Hardly matters tho. And htmx is worth exploring. As is HTML over the wire tools across various languages.
- ilrwbwrkhv 4y ago100%
- drdaeman 4y agoSometimes it matters a lot. I'm a Pythonista who had to work with Rails just today (because I had to mend some Rails-based API project I had to interop with) and cussed a lot. Rails remind me of Perl's metaprogramming beauty (code is almost literature or even art) but also its worst sides (unique situational DSLs for everything and then some more, with TIMTOWTDI). It takes a lot of research to figure out where things are coming from because everyone seem to really love metaprogramming the whole kitchen sink, magically converting :symbols to ClassNames to autogenerated helped methods to generated attributes. And nothing is ever implicitly imported in the file you're looking at. Surely, it's all pretty simple after you learn how the particularly selected gem is used, but almost incomprehensible before you do. E.g. I just struggled for good 15 minutes before I learned that expose(:foo) is from a `decent_exposure` gem (and read that gem's source to understand how and why it does all its magics) - and there seem to be hundreds if not thousands of such gems in any sufficiently large and old Rails project. Oh, TIL that Rails doesn't implement If-Match at all (only If-None-Match for GET and HEAD through some Rack middleware). Every other toolkit I've used had something for that.
- willbudd 4y agoGood luck talking to cloud infrastructure such as Cognito-authorized AWS S3 buckets on the client side with a last century mindset like that.
- senttoschool 4y agoState of JS but completely leaves out the backend Javascript/Node/Bun/Deno ecosystem.
- jakelazaroff 4y agoRuntimes are here: https://2022.stateofjs.com/en-US/other-tools/#runtimes https://2022.stateofjs.com/en-US/other-tools/#runtimes
- senttoschool 4y agoDoesn't say much to be honest. Anyone who develops in Javascript must use Node.js because the front-end tooling uses Node.js. I'm interested in a whole breakdown of Javascript in the backend.
- deleted 4y ago[deleted]
- sgdesign 4y agoI'm the lead survey maintainer; I agree that the survey is very front-end oriented, but that's because it was hard to properly cover everything, and we're instead hoping to do a separate "State of Node" (well, or a similar name that also includes Deno, Bun, etc.) survey at some point.
- senttoschool 4y agoI appreciate the work but it seems like this should be called "State of Javascript Frontend" instead of "State of Javascript". It's missing alot.
- pcurve 4y agoMainly look at Svelte's... its adoption more or less flatlined this past year compared to previous years :-/ https://2022.stateofjs.com/en-US/libraries/front-end-frameworks/ https://2022.stateofjs.com/en-US/libraries/front-end-framewo...
- deleted 4y ago[deleted]
- whatshisface 4y agoSvelteKit isn't there yet, but once it is fully fleshed out (yes, I know it hit 1.0, but it still doesn't support the big three cloud providers out of the box) I think it's going to change the standard for frontend architecture. There is no way to get React to render itself on edge servers.
- rswerve 4y agoIt's a little funny that Javascript haters and Javascript influencers meet in their desire to highlight the new and shiny toys of the front-end ecosystem, but if you actually look at the survey results (or work on the front-end) then you know that in the real world, where people are shipping to prod, the story is the stability of favored tools. These things won: React, Webpack, Jest. They've been the dominant tools for years. (Typescript is getting there.) The ecosystem around them is enormous; a million edge cases have already been handled; they're not going anywhere for a long time. It's not really a surprise that as browsers become more like operating systems, people will experiment and find new ways to leverage the available capabilities, but you don't have to play with the new toys, and you definitely don't have to use them for paying work. Just say "risk" ten times if anyone suggests them, and your PM will end up agreeing with you.
- whatshisface 4y ago>The ecosystem around them is enormous; a million edge cases have already been handled; they're not going anywhere for a long time. Sounds like everything that came before them, but they got a foothold somehow. >Just say "risk" ten times if anyone suggests them, and your PM will end up agreeing with you. Please don't overuse this, if you get in your groove then ten years down the line you'll end up being a naysayer to something the company actually should adopt.
- 0xblinq 4y agoYeah, like one of the companies I briefly worked for. An outdated hell of WordPress, with no package.json, no linters, no formatters, copy & pasted / vendored dependencies, lot of NIH home built libraries, no tests, no framework other than jQuery, no automation (we built scss from the CLI because "we don't need to complicate it with scripts", and absolute negationism about any "shiny new tool" if it was less than 20 years old. The only people that stayed there were the ones happy to work in those conditions, or that haven't seen anything better. Those places still exist, sadly.
- nullfish 4y ago
- vbezhenar 4y agoHere's my feelings like someone who's not strictly frontend developer but has to deal with it from time to time. Frontend seems to be React, rest is dead, everyone's on React. Build system seems to work. Last time I used vite and didn't tinker with it at all. It just works. That's good. It was a royal pain for in in the past. All those grunts, webpacks, gulps and whatnot. But it doesn't seem like dust is settled yet. I guess more build systems will appear and disappear in the future. State storage: I don't know. Redux was hot in the past. Nowadays it seems to be react-query which is supposed to be wrapper around fetch but apparently its caching is good enough to replace the whole state storage framework. Sounds weird, but here we are. Routing is weird. I don't understand what's with it. There's react-router but there are some fuss with latest version, with react-query compatibility. Code quality tools are not complete. There's prettier which is nice but does not work for everything as they have some weird artificial constraints, like they don't want to insert curly braces automatically, so you need to use eslint. Configuring this stuff still is pain. Deno is awesome in that aspect. What I miss in JS ecosystem is something single which solves all my problems. Like npm which can also build website, which can hot reload it for dev mode, which can autoformat my code with single blessed unconfigurable code style, which can lint it, which can run unit tests and so on. I don't want to spend a single second setting up my environment.
- whatshisface 4y ago>What I miss in JS ecosystem is something single which solves all my problems. Like npm which can also build website, which can hot reload it for dev mode, which can autoformat my code with single blessed unconfigurable code style, which can lint it, which can run unit tests and so on. I don't want to spend a single second setting up my environment. SvelteKit can do that.
- komali2 4y agoI'm EXTREMELY confused about what's going on with react router, the documentation seems mismatched from versions, and any tips I find online seem to be for some now defunct version. I remember a few months back I was working on a react app with react router and trying to figure out how to hook into all route changes for some reason, and all the documentation centered around "picking a router," of which there was `createBrowserRouter`, `createHashRouter`, etc, all which had different considerations. But I couldn't find an invocation for any of those! Just a single `useRoutes` and that was it lol. And the argument for it was just objects and arrays, with element properties set to JSX. From my understanding, we shouldn't have had history working at all without explicitly setting it to do so, but it all was working, so... who knows?
- spiffytech 4y agoThe new comments section on the frameworks page is nice. It's interesting to see which ones people for apathetic about and which have lots of love.