Earlier quoted context omitted.
All of the frontend stuff I've been involved with (mostly as a backend developer) has long been retired. There's not a single thing I can point at that lived for more than 2-3 years before getting shelved or replaced. The stuff you mention I would classify as shiny new stuff. Easy to hire for now and in fact I know a few guys looking to hire exactly that kind of skills. It's going to be different in a few years becau…
I don't think it's so much about fashion/trends as it is about ever increasing user expectations, and frankly JS/HTML/Web is the best of the worst solutions. It's not ideal but its the fastest and most accessible. Everything started going to shit in front-end after the iPhone was released. You had the emergence of web apps, web as a platform, pervasive social media, so many horrible things....
State of JavaScript 2021
151–160 of 245 posts
Re: State of JavaScript 2021
#152Earlier quoted context omitted.
Correct, but people are more likely to learn a new skill or a tech stack in their 20s than in their 40s. And when current 65+s were in their 20s javascript wasn't a thing yet.
Not sure people over 40 don't want to learn new things; they're likely just more interested in stable long-term technologies and investing their time wisely rather than hopping onto the newest fad all the time. With age comes understanding that the more things change, the more they stay the same. Emperor's new clothes and all that.
Re: State of JavaScript 2021
#153JS 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.
At least for me it was never a decision once I found TS, TS always got chosen. My spicy opinion in the JS space is that Typescript is better in every single way over Javascript, it is a superior language. Typescript IMO should be merged into Javascript, how anyone develops with just JS anymore (especially larger projects) baffles me.
Re: State of JavaScript 2021
#154> Another guaranteed scientific finding: buying our t-shirt will increase your programming skills by over 9000! Okay, fellow kids. This report doesn't surprise me. The JS community has devolved into bunch of people who re-invent everything in 2-3 year cycles. It's Silicon Valley in online clique form - and that's coming from being both deeply intertwined in it for the better part of a decade, and working in SF big te…
Devolved? I honestly thought it had always been this way, going all the way back to the jQuery / MooTools / YUI / Dojo days.
Re: State of JavaScript 2021
#155Earlier quoted context omitted.
I'm working on a codebase that evolved at the same pace as React, but without any thought for idiomatic principals. As a result, you have class-based components, purely functional components, hook based components, HOCs, Redux state passed in through the older functional way, Redux state passed in through an HOC, styled components, traditional CSS styled components, and anything else you can think of that was in vogu…
I believe React is inherently terrible, rather than your reason. I think all libraries that try to abstract an underlying technology into something that it is not, and then also have to provide escape clauses for the abstraction because the user actually has to know how the underlying stuff works, are inherently broken. I also think state-based reactivity is a terrible way to reason about things because sometimes you…
1. Escape hatches are good. Designing an API is hard, and supporting every use case within that API is harder. Providing a way to make sure you don't get backed into a corner means you can continue building things.
2. State updates -> View updates seems perfectly reasonable to me. I don't think I've ever wanted a view to use a stale piece of state in one section and an up-to-date piece of state in another.
3. Reconciliation is just React's way of saying "we are trying to make things fast." I generally don't have to worry about how this happens while I'm building things: I can just build things. A library that let's me focus on business logic rather than boilerplate or implementation details is one that I want to continue using.
4. "Thinking in React" I put into two buckets: The first is easier to grasp, in how to reason about state (propagating down in one direction) and how to keep things in "React" land (don't manipulate the DOM directly, React won't "know" about it). The 2nd is in the API, and I'll admit does take some time to get used to. Lifecycle methods I think can be learned faster, but knowing the lifecycles around hooks also can be learned, of course. Plus, the abstraction and co-location benefits of hooks outweigh the learning curve IMO.
5. The [rules of hooks][1] that React provides is just two items, hardly overwhelming. The actual API of hooks (e.g. the need for a dependency array, return function from useEffect to cleanup on unmount, etc.) is larger and takes longer to fully grasp, but being able to have a linter catch a large chunk of these is a good thing in my book. Plus, no library is without its footguns. In the jQuery days there were plenty of times I'd forget to remove a listener, create race conditions in ajax stuff, etc. Learning a library's API is just that, its API. You are writing in Javascript, but of course no one is saying "the idea of dependency arrays is 'Javascript,'" although that concept definitely appears in other computer science / programming fields.
Re: State of JavaScript 2021
#156Proxies 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…
For folks wondering, here's how it would work:
const htmlClasses = new Proxy({}, {
get: (target, prop, receiver) => document.querySelector('.' + prop)
});
// Get element with class pagetop
htmlClasses.pagetop;
const htmlNodes = new Proxy({}, {
get: (target, prop, receiver) => document.querySelectorAll(prop)
});
// Get all h3s
htmlNodes.h3;
You can run this on hackernews to see it work.Re: State of JavaScript 2021
#157Proxies 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…
Your comment makes no sense without you specifying what the "divs" variable value even is.
Re: State of JavaScript 2021
#158Earlier quoted context omitted.
I believe React is inherently terrible, rather than your reason. I think all libraries that try to abstract an underlying technology into something that it is not, and then also have to provide escape clauses for the abstraction because the user actually has to know how the underlying stuff works, are inherently broken. I also think state-based reactivity is a terrible way to reason about things because sometimes you…
I really disagree with this, plus I have to say, it doesn't sound like you are offering an alternative. 1. Escape hatches are good. Designing an API is hard, and supporting every use case within that API is harder. Providing a way to make sure you don't get backed into a corner means you can continue building things. 2. State updates -> View updates seems perfectly reasonable to me. I don't think I've ever wanted a v…
React is the exact opposite of that. Endless boilerplate, abstractions and unwritten rules. As the reality of large projects sets in, they look nothing like the starter examples.
Re: State of JavaScript 2021
#159Re: State of JavaScript 2021
#160Not 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. That’s the fate of any tool that becomes popular enough.
Interesting pov. If people had a say in choosing something 90% like react, would they work happier ? Just like clients needing 4 times the same design just so they can pick their preferences?