And sincerely, despite being a front-end web developer that likes this language, I totally get why it gets such bad press.
But despite understanding the feeling, I can't really agree with the conclusion. Despite my job title, I don't love
npm install-ing gigs of code from the internet and serving you loading spinners while I rage against my
package.json updates. I'm not the developer advocate of an evil corporation soft powering you into my monopolistic tribe.
I disagree because I feel this "anti-JS" idea is as exclusive as the "pro-JS" side that birthed it, and because both sides disregard either the technical or human capabilities of their users by taking a scorching earth approach at solving their own issues.
Let's take a few examples.
- A tax calculator that updates in real time when you enter data, and tells you in real time what you're going to pay, is less stressful, more efficient and requires less back and forth than a page based experience.
- An insurance company offering a complex subscription tunnel composed of a dozen of pages is a non-ending, unnavigable mess ; that could be replaced by several smaller forms, stacked onto each others, which can be saved, edited and reduced on the fly, all in a single page.
- Someone with dyslexia that needs an adapted design would have to go into its configuration panel to select a dyslexia mode in a form, then validate it, which would reload the whole website with a new stylesheet. It could be replace by a simple toggle button, without reload, in any page.
That's what progressive enhancement and graceful degradation are made for, and they already work very well. You should equally be able to get housing benefits by struggling one hour on your Playstation Portable with a basic user experience if that's all you have, or in five minutes on a recent iPhone by using an automatic form filler that picks your data locked with your fingerprint.
Most of the frontend frameworks à la mode are now used in meta-frameworks (with Next being the leader) that provide server side rendering with interactions (yes, they are recreating PHP and Jquery duh), thus working on older hardware. Some of those frameworks are not even libraries anymore, but compilers (like Svelte) that outputs super tiny and efficient code, far from the bloat we currently experience.
This is not to say that everything is perfect. It's still gonna take years to undo the damage that Angular and React did to the web while keeping their benefits. But things are progressing in the right direction and maybe, soon, we'll be able to have websites that don't look and feel like a 2005 page, while visiting them on a 2005 computer.