Live data from Hacker News

React is winning by default and slowing innovation

lorenstew.art

221–230 of 866 posts

Re: React is winning by default and slowing innovation

#221
One of the issues I find is that JavaScript itself holds back the ability of tool makers to experiment with practical novel alternatives.

TypeScript's tsx macro is designed with React-like libraries in mind and alternative frameworks need to create custom file types and LSPs just to get off the ground.

I'd love to see the JavaScript spec define a generic macro system to enable experimentation (with IDE support) for alternative frameworks.

For example, jsx/tsx could be expressed with an inline macro

    export App() {
      return jsx!(Hello World)
    }
While something like Vue or Svelte could implement their own inline macros rather than investing in tooling for their custom file types

   export class App {
      #[onChange]    //  {this.value = "updated"}, 1000)
      }

      render() {
        return vue!({{this.value}})
      }
   }
If it's part of the spec, the browser could interpret it without a preprocessor and compilers like tsc/swc etc could precalculate the transformations and ship the transformed JavaScript (like we do today with tsx)

Re: React is winning by default and slowing innovation

#222
post #152

Earlier quoted context omitted.

Honestly I think React DX kinda sucks, at least in some areas. Performance is one of the worst (`useMemo` and `componentShouldUpdate` are way to easy to ignore, constant re-renders are the norm and writing performant React code requires conscious effort to avoid footguns) but it's also just less self-explanatory than the alternatives I've tried. I started doing web dev before reactivity frameworks were a thing, and I…

I think you've nailed it. It does come down to user preference. React _is_ a whole new way of thinking. Back in the days of jQuery it was very painful to stitch together web experience across HTML+CSS+JS. jquery provided much needed DX around utilities to navigate across these pieces. But it was still way too easy to treat HTML like your database and model user-state across a Frankenstein of server, json, html, and j…

Neither react's JSX nor vue's template language are HTML. But rejecting vue's template on grounds that it's not HTML seems odd. React's JSX deviates from HTML in many ways. Like class vs className. XML self-closing vs HTML self-closing. onchange vs oninput. On purely aesthetic grounds, I can't understand how the react idiom of array.map() would ever be preferable to an affordance in the (non-HTML) template language for handling this normal standard thing that always happens.

Re: React is winning by default and slowing innovation

#223

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?

No, but think about the trajectory. Most people new to building a frontend bare-prompt. There's value for them in using the most supported language, including support from AI systems.

Re: React is winning by default and slowing innovation

#225
post #152

Earlier quoted context omitted.

I think you've nailed it. It does come down to user preference. React _is_ a whole new way of thinking. Back in the days of jQuery it was very painful to stitch together web experience across HTML+CSS+JS. jquery provided much needed DX around utilities to navigate across these pieces. But it was still way too easy to treat HTML like your database and model user-state across a Frankenstein of server, json, html, and j…

Neither react's JSX nor vue's template language are HTML. But rejecting vue's template on grounds that it's not HTML seems odd. React's JSX deviates from HTML in many ways. Like class vs className. XML self-closing vs HTML self-closing. onchange vs oninput. On purely aesthetic grounds, I can't understand how the react idiom of array.map() would ever be preferable to an affordance in the (non-HTML) template language f…

it's not about feigning html purity it's the opposite. Why pretend we're using HTML when it's not? so with react it becomes a js flavor, jsx, which some people hate but it's very clear that it's a made up language IN real javascript.

edit: the mental model is instant: it's just javascript for reals. do anything you want in javascript using real js primitives. it's not about looking pretty, jsx doesn't. it's about not relearning basic programming primitives in a made up _markup_ language.

my issue with angular is it's neither real html nor any programming language. its made up pseudo-programming language for no other reason than it fools people into thinking "it's just HTML". that's my gripe.

Re: React is winning by default and slowing innovation

#226

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.

Why? I don't care how the chrome engine works. I care about building a great CX and making money

[flagged]

Re: React is winning by default and slowing innovation

#227
post #112

Earlier quoted context omitted.

+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 t…

I don't really recommend isomorphic environments, but if it's your cup of tea, Tanstack Start is making a lot of progress. It removes all of the magic and misdirection of Nextjs and just provides a good light alternative.

Issue with all things tanstack is they change everything constantly. The Tanner guy really does make decent libs but he drops em pretty quickly for others to take up maintenance on which makes it risky to pull into any production app.

The best library are the complete ones.

Re: React is winning by default and slowing innovation

#228
I started a new job last year (on a greenfield project) and our director of product told us we had to use React because "we won't be able to find developers if we don't use react". I love constantly shooting myself in the foot with react because vercel has good marketing.

Re: React is winning by default and slowing innovation

#230

Earlier quoted context omitted.

At least in my own experience, I tried building a relatively simple static SPA NextJS React app with their router, and wanted to host it on CloudFlare Pages. It ran locally in dev mode just fine. Once I deployed it on CFP, the router broke. No errors in the console, it just didn't work. If I'm forced to use Vercel to make a simple SPA work, which then forced me into paying for their service, that's the problem.

OpenNext on Cloudflare is the only way I've successfully gotten NextJS to work in a Cloudflare Worker. https://opennext.js.org/cloudflare

Interesting. Yea, I didn't want a worker, just a static html page with my javascript.
Post reply on HN