Live data from Hacker News

React is winning by default and slowing innovation

lorenstew.art

341–350 of 866 posts

Re: React is winning by default and slowing innovation

#341
React isn't winning by default. It's been so effective, so well designed that it's lived long enough to become the defacto standard... and the villian.

Claiming React is slowing innovation is an absolutely bonkers take when React is essentially the only sane stable choice in a sea of "me too" frameworks and libraries with conflicting and confusing design choices.

Re: React is winning by default and slowing innovation

#342

Earlier quoted context omitted.

> I groan every single time I run into (yet another) hook rule. There are only two rules: 1. Only call Hooks at the top level 2. Only call Hooks from React functions Per https://react.dev/reference/rules/rules-of-hooks Not sure I understand the conditional beef, perhaps you can give example? I would assume if you want `if condition, useEffect(...)` you could simply replace with `useEffect(() => if condition...)`, no?

Fair. My bitching would've been better expressed as "I groan every single time I attempt to violate a hook rule." Which is a lot, because I'm new to React. It's almost certainly a "skill issue", but hooks are NOT just "JavaScript functions", contrary to React marketing PR. My conditional beef: in my app, users can choose between using the built-in mic for speech recognition or a 3rd party service (LiveKit). If the us…

Yeah, this is a really annoying thing about how hooks work. For whatever reason (I'm sure they have a great reason) React can't do hook state book-keeping correctly without tying it to a function component lifecycle.

I think you actually can conditionally render a hook but that choice has to last for the entire rendered lifetime of the component. But that doesn't really help you when your user can switch between them.

Re: React is winning by default and slowing innovation

#343

Earlier quoted context omitted.

Sure you can make a blog without a framework. But for complex applications it’s far better/easier than raw DOM manipulation or rolling your own thing.

I disagree. It’s actually the same effort either way, but one of those costs substantially more to maintain and performs far slower.

It is not obvious to me which one you are talking about.

Re: React is winning by default and slowing innovation

#344

Web components are the way out of this trap. Every single framework that isn't React should be wholeheartedly supporting web components to make sure that they have access to a viable ecosystem of components and utilities without having to bootstrap an entire competitor to React and it's ecosystem. While a lot of people view web components as competitors to frameworks, they don't really have to be. The just define an…

At my large corporation, we are required to use a centralized React library for internal apps. So it is not “react by default”, but instead “React is the only choice”. 100% agree that our path out is for the central library to be reimplemented as web components to open us up to using whatever framework we choose.

That's a very normal thing for a big shop --- if it wasn't React it would be something else --- so kind of tough to pin that constraint on React.

Re: React is winning by default and slowing innovation

#345

Earlier quoted context omitted.

> React is mostly HTML driven by data. I wish! Mostly though, React is a terrible mess of hooks with weird rules, suspense, “use client”, pedantic docs, and millions of other idiosyncrasies that have no business being this mainstream. I think most people agree that the core ideas are great. Eg composable components, props, unidirectional data flow etc. There’s a reason that all other reasonably popular frontend frame…

> pedantic docs Are you referring to something in particular here? I've had my issues with the docs in the past, but I don't think I'd describe any of them being related to pedantry.

This is the most pedantic section for me, it’s just a bunch of 5 year old illustrations with 0 explaining on how React actually works behind the scenes: https://react.dev/learn/render-and-commit

Re: React is winning by default and slowing innovation

#346

> Hooks addressed class component pain but introduced new kinds of complexity: dependency arrays, stale closures, and misused effects. Even React’s own docs emphasize restraint: “You Might Not Need an Effect”. Server Components improve time-to-first-byte, but add architectural complexity and new failure modes. There are a lot of valid criticisms of React, but I don't think this is one of them. These problems are not…

The dependency array thing is really easy if you use eslint with the react rules of hooks.

Re: React is winning by default and slowing innovation

#347

Earlier quoted context omitted.

They kind of are not though, you can't call them out of order and other things which is checked at runtime by the React "engine" and will stop script execution. If they were regular functions you could call them anytime.

Many "regular" functions are context dependent.

They are context dependent, must execute in the same order every time, and must be called every time the component re-renders (i.e., they do not support conditional calls). They have enough gremlin rules that calling them "just functions" is unhelpful for reasoning about using them.

Re: React is winning by default and slowing innovation

#348
post #314

Earlier quoted context omitted.

Im not sure how this is a negative merit for React. Besides if you are a small company, or a start up, your job is to get things done. Not to embark on a global technology crusade to push your favourite tech. By and large the best thing about react is the overall ecosystem, libraries, talent and ubiquitousness. And thats a good thing.

It isn't necessarily a bad thing, but it doesn't align with the idea of how good react is or the technical merits of it. I also am not saying teams I have been on that picked react made the wrong choice. That's all in context and as you said startups are often in the "get things done" mentality where tech debt won't matter if you can't survive long enough for it to matter.

It’s good enough that the ecosystem outweighs the superiority of something like SolidJS.

React has React Native as part of its ecosystem. That’s a massive advantage. react-strict-dom is going to be a game changer for the development of universal apps.

Re: React is winning by default and slowing innovation

#349

React isn't winning by default. It's been so effective, so well designed that it's lived long enough to become the defacto standard... and the villian. Claiming React is slowing innovation is an absolutely bonkers take when React is essentially the only sane stable choice in a sea of "me too" frameworks and libraries with conflicting and confusing design choices.

It's the inversion of the title. Innovation is unable to keep up with the winning React formula.

Re: React is winning by default and slowing innovation

#350
In the age of AI, it's all about popularity contest unfortunately. More people use it, more data points, more training data to feed, better AI response, more people use it.

Svelte shot itself in the foot with runes and other incompatible (but minor) syntax changes. Bad timing. Because now whenever I ask any AI, they will suggest old syntax that doesn't compile.

Post reply on HN