Live data from Hacker News

React is winning by default and slowing innovation

lorenstew.art

671–680 of 866 posts

Re: React is winning by default and slowing innovation

#671
post #472

React isn’t just "winning by default" It's winning because at the core it's just JavaScript function composition. A component is a function, conditionals are `if (...) { ... } else { ... }`, loops are `map()`. JSX is just sugar for function calls. In Svelte you are writing XML with little JavaScript islands inside it. Instead of if you get `{#if}{:else}{/if}`. Thats not "ergonomic" – thats a mini-language stapled on…

So JSX is pure Javascript and not, say, a dialect of XML embedded in JS? Because it sure looks like the former even though it compiles to the latter. React isn't Javascript. It's a franken-language that looks superficially like a mix of JavaScript and XML whilst following the rules of neither. That's why there is such a thing as a React compiler - a good sign that you're not writing JS, which doesn't have compilers.…

Everything has compilers now and we definitely want to go that direction. The no build people aren’t close to building any popular consensus, like not close at all. Even plain JS is compile heavy because browsers are just compile targets.

Re: React is winning by default and slowing innovation

#672

I feel this with every fiber of my being. I used to do a TON of front-end work, some of it quite cutting edge, delivering highly performant user experiences in the browser that had previously been only thought possible in a native app. Back in like 2009-2015. I was deeply connected with the web standards fundamentals and how to leverage them mostly directly. I detoured into heavier focus on backend work for quite a w…

>You still get JSX Give me S-expressions instead. How else am I supposed to prove to frontend developers that I didn't make those up

S-expressions is basically the much better version, that doesn't need a special interpreter/parser and doesn't reinvent the wheel.

Re: React is winning by default and slowing innovation

#673
I switched from PHP to TS and vue some years ago. From time to time I look into react. And I still don't get the hype. For me, vue is the much more sane way of handling frontend development with js/ts. React looks bloated and overcomplicated to me. But maybe thats just me.

Re: React is winning by default and slowing innovation

#674

Earlier quoted context omitted.

The same is true everywhere in tech, I swear. "What if we abstracted away X?" My dude, you're already operating on like five levels of abstractions, and you haven't the slightest clue how any of them work. The answer isn't another abstraction, it's learning how computers actually operate.

I once worked on a VK mini app with one guy. He was building the app itself, I did the backend. He just recently started learning web development, having never done any programming before. So I'm ready for him to test my backend, I tell him to make a request to https://... and pass this and that parameter. And he just has no clue what I'm talking about . He somehow managed to learn React, a bit of HTML and a bit of C…

I once had a co-worker admit he wasn't always sure which code ran on the server and which in the browser, in a PHP/javascript app that didn't use nodejs.

Re: React is winning by default and slowing innovation

#675

Earlier quoted context omitted.

React gets reinvented every year? Are you talking about functional components instead of class components? What big changes am I missing here? It seems pretty static to me.

Maybe they are, I can't speak for them but I've noticed that React hasn't been "reinvited every year" since maybe, 2019 or so, whenever we changed from functional components to class components and then back to functional with hooks. My feeling is that people who have been devving in react post-all-that-nonsense are living in the new world of a much more stable framework that does have new things coming in (Server Co…

Are you saying that the recent changes wasn't a reinvention? React now looks like PHP ffs.

Re: React is winning by default and slowing innovation

#677

Earlier quoted context omitted.

Webapps were a mistake :(

The frustrating part is that the idea is incredible. Everyone has this piece of software on their computer that lets them run anything as long as there is a server to talk to. I love it. I don't want to have to download a thousand apps, especially not for shopping or banking. Just using a web interface is awesome. Unfortunately we decided the correct way to provide the functionality was by layering bonkers ass abstra…

Indeed, CSS especially is the root of all web evil. When you understand how it break all kinds of known good software design patterns, and you've seen the Frankenstein monstrosities people build with it enough times, you'll be tempted to do as I've done for a while: banish almost all use of external CSS from my projects.

I use inline styles mostly, with an external CSS file only used for a few very global styles. And I try to only use it very simply, avoiding all kinds of clever tricks that some dev think is the mark of good code.

Re: React is winning by default and slowing innovation

#678
post #468
post #439

I'm not a front end dev and only use JS stuff time to time for small personal project. There is so much JS framework out there that appear and disappear so fast. I don't know if we can call it innovation. I have the impression they just reinvent the wheel with so little value added. I prefer to keep on React at least it will not disappear the next time I will do some change on my project.

It's really hard to be sure, but my pet theory is that frontend tech has been rapidly evolving since it had to solve some real problems that are relatively new at scale: - Work with reactive variables - Combine three different languages - Write modular code - Enable highly response designs The target platform (the web) doesn't natively support all of these things elegantly, and maybe for good reasons. I've got the fe…

That is my feeling/hope as well. Modules were a big win, even if the advantage was felt mostly in bundlers and it’s just now arriving in browsers and node. Hopefully signals will be a smoother thing

Re: React is winning by default and slowing innovation

#679
post #472

React isn’t just "winning by default" It's winning because at the core it's just JavaScript function composition. A component is a function, conditionals are `if (...) { ... } else { ... }`, loops are `map()`. JSX is just sugar for function calls. In Svelte you are writing XML with little JavaScript islands inside it. Instead of if you get `{#if}{:else}{/if}`. Thats not "ergonomic" – thats a mini-language stapled on…

> React isn’t just "winning by default" It's winning because at the core it's just JavaScript function composition. A component is a function, conditionals are `if (...) { ... } else { ... }`, loops are `map()`. JSX is just sugar for function calls. I agree with JSX, and function components are nice, but React is most definitely not just function composition. Hooks add state and introduce life cycle events that take…

So basically react class components? It definitely was not easier in those days.

When your just using vanilla react, I've never had a problem with hooks being that hard to reason about. Once you add in SSR, routers, query caching frameworks, etc the "lifecycle & state" starts to get confusing.

This is mostly a problem with the additional complexity of these frameworks (nextjs, tanstack) and not react at its core. Building an app with just react (and maybe redux) feels so simple and natural once you learn the paradigm.

Re: React is winning by default and slowing innovation

#680
post #453

Earlier quoted context omitted.

My pet theory is that frontend devs have so little on the critical path, and are usually overqualified for the kind of work they do, that they keep reinventing these interesting paradigms for managing state in GUIs basically just so they can keep themselves entertained.

You are giving most front end devs way too much credit. Most just use React because that's what they were taught and see it as an end rather than as a means to an end as if it is an accomplishment. Computers have become faster while websites have become slower. You can go on a random webpage and usually see 100s of MBs of memory being used while we had computers in the 90s running 3D games with around 1/100 of that.…

Every software has become slower, not just websites
Post reply on HN