Live data from Hacker News

React is winning by default and slowing innovation

lorenstew.art

441–450 of 866 posts

Re: React is winning by default and slowing innovation

#441

Earlier quoted context omitted.

I have been a part of quite a few tech stack decisions at various companies and startups. I have literally never heard an argument made for react that included merits of the framework itself. The decision was always based on a combination for familiarity, ability to hire for eng roles, and the ecosystem.

Then why dont you pick jquery? Its easy and well known, even now. The answer I see is that react is technically good enough. Using boring technology doesnt mean using the technically most advanced thing. It means picking something safe and stable.

Why would you need jquery today? What can it do that native browser APIs can't?

Re: React is winning by default and slowing innovation

#442
post #438

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.

Also react in particular in combination with tailwind seems to be easier for LLMs to generate. Probably due to the condensed syntax, no split between code, css and html, plus the color naming scheme of tailwind.

Probably due to the extremely large amounts of React code in the training data set, not due to any inherent advantage of the framework.

LLM coding will lead to stagnation in languages and frameworks as developers start considering how competent their favorite agent is in each domain.

Re: React is winning by default and slowing innovation

#443

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.

I humbly disagree. I've never built a highly interactive application with React, only simple sites where the guys before me chose React, so I can't speak to its relative strengths or weaknesses there, but I've found that it doesn't scale down very well to simple sites. For a simple sign-in page, it's easy to just store state in the DOM and use a element to send the credentials, and maybe a little JS for the password…

You certainly don't need JSX for React, nor a build chain. My ship investor Kelly trainer game[1] is a simple React application in a single HTML file. The initial page load is slow because I experimented with using built-in browser module support to pull in React, but if you change it to serve a pre-built library from a CDN instead then also the initial page load is fast.

You can view the source on that page to see how simple it can be, but here is the essence:

1. Import React. This is the step you can do from a CDN instead of you want a faster initial page load. (Okay apparently I'm using Preact here, but it's effectively the same thing.)

    import { h, render, createContext } from 'https://unpkg.com/preact@latest?module';
    import { useState, useMemo } from 'https://unpkg.com/preact@latest/hooks/dist/hooks.module.js?module';
2. Render React components in HTML elements. This is where the progressiveness comes in. You don't have to render the entire web page as one React component; you can choose to only render some components in some locations of the page.

    const appDiv = document.getElementById('app');
    render(h(App, null), appDiv);
3. The React components are plain ES functions that can use hooks etc. from React, as usual.

    function App() {
        let [state, setState] = useState(initial_state);
        // --------------->8------
        return h('main', null, [
             h(Description, {
                 turn: state.turn,
                 strait: state.straits[state.shipment.strait]
             }),
             h(Bankroll, { wealth: state.wealth.first() }),
             h(Investment, { invest, state }),
             h(WealthHistory, { wealth: state.wealth }),
         ]);
    }
Instead of JSX we use the h function, which takes either tag name in a string, or another React component, takes an attribute dictionary as the second argument, and a list of children as the third. That's it. Super easy.

[1]: https://xkqr.org/ship-investor/ship-investor.html

(There is at least one bug in the game logic that prevents this game from being any fun at the moment. I have not taken the time to investigate why that happens, because I have not offered the training that used this tool to anyone in a few years.)

((If you enjoyed the game anyway and want more of a challenge, you might want to try the continuous version: https://xkqr.org/ship-investor/ship-investor-2.html. There is also a secret third version simulating futures which I have never shared with anyone before. It is playable, but not finished: https://xkqr.org/ship-investor/ship-investor-3.html))

Re: React is winning by default and slowing innovation

#444

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…

You’re assuming webdevs are rational creatures which in my experience is far from truth, since they easily fall for human biases traps such as “social proof” and “authority”.

Pretty much every social group falls prey to these biases. It has no correlation to the education or intelligence level of the group. When there is a well known saying "science progresses one funeral at a time" you know it is unavoidable.

Re: React is winning by default and slowing innovation

#445
What keeps me and a lot of people/companies on React is React Native (and React Native web / strict dom). I'm sure we could move over to Svelt or Vue or any other number of frameworks on the web, however having a shared codebase and/or shared components across native and web is a game changer and not currently possible with anything but React.

Re: React is winning by default and slowing innovation

#446

Earlier quoted context omitted.

I humbly disagree. I've never built a highly interactive application with React, only simple sites where the guys before me chose React, so I can't speak to its relative strengths or weaknesses there, but I've found that it doesn't scale down very well to simple sites. For a simple sign-in page, it's easy to just store state in the DOM and use a element to send the credentials, and maybe a little JS for the password…

You can use React without jsx by the way. The syntax isn't great but it is doable.

[deleted]

Re: React is winning by default and slowing innovation

#447

There are no alternatives that are 3x better than react. That’s the minimum it will take to change the ecosystem default. React is good enough for most applications. Is that slowing innovation? Vercel’s rsc push is definitely headwinds. But IDK, I see lots of interesting libraries around state mgmt & local-first primitive. I’d like to see more focus on SSG and islands architecture. I think bun 1.3 (bake) will be a he…

RSC is React’s take on SSG and islands architecture (but deeply composable rather than shallowly).

Re: React is winning by default and slowing innovation

#448

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.

Have you actually used Vue or any of the other options in a full application? Because what you are saying doesn’t match my experience.

Re: React is winning by default and slowing innovation

#450

Earlier quoted context omitted.

What metric would you use to define the leading frontend framework, and what is it? I'm familiar enough with Angular, React, Flutter, Vue, and Svelte as big names in the ecosystem, but have really only done scrappy development with React and not much with the others. Google trends seems to show React is still a leader [1], and React has more than double the amount of Github stars than any of the others I've mentioned…

They said "leading innovative framework", and innovative is the key word. The biggest player is almost never innovating, they are usually performing some kind of undeserved market capture.

Indeed, I meant leading in innovation.

React isn't innovating, it's just improving what it already does, but it doesn't do it in a new way.

That makes it stable, and a safe choice for devs. But yeah indeed like the article says, it kind of stagnates innovation in the ecosystem. But yeah I guess that is because React is usually "good enough" in most cases. Not enough reason to use something else.

Post reply on HN