Live data from Hacker News

React is winning by default and slowing innovation

lorenstew.art

111–120 of 866 posts

Re: React is winning by default and slowing innovation

#111
In simple applications, can we replace JS frameworks by a document with guidelines and best practices?

What if I want to avoid frameworks and stick to vanilla JS, following instead good strategy and coding conventions for managing state, reacting to events, etc, all in pure JavaScript while avoiding spaghetti code. Does a document like this exist?

Re: React is winning by default and slowing innovation

#112
post #102

React is winning because its really good. Even if the cost is an extra few milliseconds of render time and few extra hours of dev time figuring out things like hook dependencies. If React starts taking a backseat, it'll be because its no longer really good. And, to be fair: I've started to see this happen. Next & Vercel have totally taken over the React world, and they've proven to make quite poor architectural decis…

+1 React DX is really great. It started really great and it got weird and bloated but it's still really great relative to the JS landscape hell.

But, also yes, it's a pain in the ass and a frustrating kind of necessary evil. So there is room for improvements.

Nextjs is a living hell. The ironic thing is AI makes it dramatically more tolerable to the point it's actually pretty good. But that can't be a good thing in terms of architectural design can it? We're in odd times.

Of course, it's easy to be a hater on the sidelines. I am guilty. Nextjs likely just does too much in it's own made-from-scratch clever way. use-client vs server is just out-of-the gate ridiculous. But then I suppose the real question is "well if you want isomorphic environment, how else are you going to do it?". My answers is "I wouldn't!" but then vercel and the powers that be seem to have won the mindshare of the product crowd. At least for now.

Re: React is winning by default and slowing innovation

#113
React is the front end framework I've used the most when doing front end. It is and was sold as a simple and performant library to build interactive web apps, but things like its virtual dom was a very memory-hungry abstraction that immediately needed fixing.

Over the years we've had a cascade of APIs to convince us that React was easy: shouldComponentUpdate, hooks / useEffect's manual dependency array. It always felt like React spent most of its time solving problems it didn't need to solve in the first place if he didn't create itself those problems by having a not so great hard to use API. State derivation and computed properties and dependency graphs were already solved problems before React came and tried to explain to everyone that it knew better. The irony is that the ecosystem is now going back on signals / observer approach.

Now that I've finished complaining, I will probably keep using it in the future! (or Preact! which i feel always done a better job of reimplementing React or more, the fresh framework from the same author while I think still WIP is really promising too).

Re: React is winning by default and slowing innovation

#114

In simple applications, can we replace JS frameworks by a document with guidelines and best practices? What if I want to avoid frameworks and stick to vanilla JS, following instead good strategy and coding conventions for managing state, reacting to events, etc, all in pure JavaScript while avoiding spaghetti code. Does a document like this exist?

so you want to avoid using a framework in order to basically code something in pure JS that does what the framework does? whats the point of that?

Re: React is winning by default and slowing innovation

#116
post #90

This is mostly just a complaint about how good React is. It's so good that it's difficult for the technical benefits of alternatives to outweigh the social benefits of choosing React. Note that this is neither a major compliment to React's technical merits nor a criticism of React's competitors. In fact, I don't even disagree with the author on some of his claims, such as: > React is no longer winning by technical me…

React is great at solving complex problems. Not all problems are complex to begin with, and having a complex tool as default otherwise adds complexity to the project and also inflexibility to iterate quickly. This is in addition to having to maintain a relatively brittle ecosystem from past feature as well as future features but that can be true for more than one area of JavaScript or other technologies. Looking for…

I think (at least part of) the reason why React has been so successful is that is scales so well: it's actually a relatively simple tool that works well for small problems. Pair it with a Vite template or something and you can be up-and-running in minutes. But it continues working pretty well as your app gets bigger, too.

But where React fails is actually in more complex scenarios. Prop drilling becomes tedious or intractable, so now we have all these different ways to manage state (Context, Redux, MobX, Recoil, Zustand, Jotai...). Your re-rendering gets slow, so now you need to start sprinkling React.memo() all over the place and adding reselect (or re-reselect!) queries and restructuring or denormalizing your store data, but then it turns out some of your props are objects that are regenerating each render cycle, so you need to memoize those too, and you end up on a wild goose chase there. Or your engineers were sloppy and accidentally put some side-effects into your components, so you've got subtle bugs you're not sure how to fix. And there's a lot of complexity or even unanswered questions around things like robustly fetching data your component needs, and maybe React Router answers them but then you end up down a whole other rabbit hole, especially when a new version of React Router comes out and breaks everything.

Re: React is winning by default and slowing innovation

#117

In simple applications, can we replace JS frameworks by a document with guidelines and best practices? What if I want to avoid frameworks and stick to vanilla JS, following instead good strategy and coding conventions for managing state, reacting to events, etc, all in pure JavaScript while avoiding spaghetti code. Does a document like this exist?

It exists. It's called a framework.

Re: React is winning by default and slowing innovation

#118
post #102

React is winning because its really good. Even if the cost is an extra few milliseconds of render time and few extra hours of dev time figuring out things like hook dependencies. If React starts taking a backseat, it'll be because its no longer really good. And, to be fair: I've started to see this happen. Next & Vercel have totally taken over the React world, and they've proven to make quite poor architectural decis…

What is Vercel doing to React? I just know them as a simple hosting solution.

Re: React is winning by default and slowing innovation

#119

The network effect gets compounded by LLMs/vibecoding. I'm not just talking about v0 or replit either. Fire a prompt at ChatGPT to build a web app and most of the time it will give you react components in return.

Even if you tell it not to use React?

Re: React is winning by default and slowing innovation

#120
post #37
post #6

> React didn’t win purely on technical merit A sentence written by someone who clearly hasn't worked on a large Angular 1.x project.

Yes, this is probably the wrongest statement. When React was launched, it was one in a pool of thousands of web frameworks. For any axis you want to claim that React won by "default", there was another framework that dominated React in that axis and lost anyways. Some frameworks had more resources and lost (Angular), some of which were more popular and lost (jQuery, Backbone), and some of which were even more hyped t…

It won by marketing and the angularjs to Angular breaking change. If they kept going with angularjs or had an upgrade path react wouldn't be default in the enterprise stack. That's all on Google.

Meteor was node framework. jQuery is probably still more popular but it is only a lib. Vue had a Chinese language problem.

React won because a framework by Facebook felt safe.

Post reply on HN