Live data from Hacker News

State of JavaScript 2021

2021.stateofjs.com

61–70 of 245 posts

Re: State of JavaScript 2021

#61

Not familiar with much front-end work - can anyone give insight to what's gone on with Ember?

Ember is in “SPA” space, so it is competing against other big js frameworks like angular and Aurelia. Angular is super famous and is backed by google,so it is more used, than ember.

On the other hand, react & vue are in “view layer” with ability to move to full SPA space with additional libraries. Hence, they have wider scope, and therefore are more used than large frameworks like angular.

This won’t change in future either. Large js framework will require more learning effort. So, newer devs would prefer smaller frameworks.

Re: State of JavaScript 2021

#62

Beginning of the end for Angular? Noticeable drop in relative satisfication but high usage numbers shows how hard it is to get rid of.

It is literally the second most used js framework in the survey.

While I am no fan of angular, I think angular is on right track. Once they support non-NgModule and vite, their satisfaction will improve.

Re: State of JavaScript 2021

#63
Proxies are cool. I use them in github.com/thebinarysearchtree/artwork which I haven't released. That libraries tag line is "you wanted less javascript and more html, so we delivered - artwork, the 100% javascript and css front-end framework". Anyway, I use proxies when I want a bunch of divs with classnames. You just do

  const { container, heading } = divs;
and then container is assigned to an HTMLDivElement 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.

  const container = document.createElement('div'); 
  container.className = 'container';
  const heading = document.createElement('div'); 
  heading.className = 'heading';
The other way you can create elements is just with a common:

  const heading = span({ title: artName, innerText: whatever });
etc so my web components have less code than react components, and run at native hand-written speed. Proxies aren'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.

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:

  const { span, h3 } = html;
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.

Re: State of JavaScript 2021

#64
post #22

I read this report every year. This year it feels the most like it's driven by hype (and marketing, hi Vercel!). 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 "popularity" (oh dear) graph, it's basically just describing how older tech slides down while newer shiny tech comes in and is instantly the m…

Agreed. Recently started a new project with react and it's awesome. Especially in combination with tailwindcss and vite. Very little code. Fast to production.

All the popular react libraries feel very mature, have zero vulnerabilities (at least according to npm) and are easily integrated.

It was a blast!

Re: State of JavaScript 2021

#65

JS and TS brought so much happiness to me for years. But I found it extremely difficult to constantly have to "decide" between X and Y. In the backend, I went all in with Golang and oh my... Now I just code. In the frontend, Svelte is a godsend. No longer need to find "React-friendly" libraries. Simple JS works for the most part. Not ideal but great versus React for the types of admin panels I build.

I think I might try Golang, I would love to just code again. I'll look into Svelte as well.

Re: State of JavaScript 2021

#67
post #60

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.

React is the hotness of the moment. If you want to maximize career mobility, salary, and immaturity all at the same time React is for you.

Re: State of JavaScript 2021

#68
post #54
post #7

Interested in the steady drop in satisfaction with Vue since 2018. I remember being positively impressed when I looked into it. 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?

Most likely due to vue 2 to 3 transition. Vue 3 introduced many improvements and breaking changes. This also made many libraries lose compatibility with Vue 3. Not a good thing. While vue 3 was soft launched a year ago. The transition is still happening. With Vue 3 becoming default last week(feb 7). And major vue frameworks (vuetify and nuxt) just still working to support vue 3. I expect satisfaction to increase next…

Vue 3 is Vues "Python 3" moment, give it a couple of years and it will be mostly forgotten.

Just as Python changed its string type to Unicode breaking compatibility, Vue changed the reactivity system. The other changes in Vue3 wouldn't fundamentally break compatibility on their own but made sense to fold into a big overhaul, just as Python did with various other changes in v3.

Re: State of JavaScript 2021

#70
post #4

Gulp build tool not receiving much love lately with a very strong "Would not use again". Why so? https://2021.stateofjs.com/en-US/libraries/build-tools/#buil...

I wrote my own build tool many years ago and rarely extend it with new build tasks. The core tool hasn’t changed much in the 5+ years I have been using it, so why bother with something like gulp?
Post reply on HN