If we moved on from React with even half of the enthusiasm level we used to move from CommonJS to ESM, the web (and the folks using the things we build) would be better off for it.
24 replies
@zachleat interested; can you tell me more?
@jeffposnick I couldn’t make the business case on this one 🫣
@zachleat I have been pretty mystified at how dominant it has become. Glad I’m not alone
@zachleat React doesn't solve all problems, but it still does solve problems, and its ecosystem is still unbeatable. For simpler/static sites, yeah just use 11ty, maybe Svelte for something a little more complex. But for large scale web apps, I would still probably reach for React before anything else
@gyanreyer @zachleat From where I am in my React learning, the Vue ecosystem is better than the React one in any possible area I can think about. And Vue itself is really enjoyable while React is an outdated monstruosity with a really poor design (at least compared to Vue) making it rather unproductive to work with.
@zachleat Yeah, we're in the beginning of a difficult time where we see the end of React in the distance and we all need to guess how fast it's coming and what the need of the project is.
My gut right now: if I had to build an app from scratch that needed that level of complexity, I'd probably use svelte or solidjs at this point because those seem like they have a longer future.
@zachleat The pain of CommonJS was felt by developers. The pain of React is felt by users.
¯\_(ツ)_/¯
@rockerest @zachleat the community seems way more excited by Astro than Eleventy and I’m like: the problem with Next/Remix isn’t that React or une on the server. It’s that hydration and mounting makes things slow and unresponsive right when the user is trying to interact
https://infrequently.org/2023/02/the-market-for-lemons/ from @slightlyoff is an excellent and highly relevant post here
@zachleat @slightlyoff the best line in the article, and the thing that cemented the strategy for me: "The Steamed Hams of technology pitches."
@reedpiernock @zachleat @slightlyoff "Aurora borealis? Here? On this web page? Can I see it?"
<page remains blank white>
@rgarner @reedpiernock @slightlyoff ahaha I love that scene so much
@zachleat An elephant in the room is #wordpress adopting React for Gutenberg. React is the future of block development for WordPress, and with ~43% of all websites running React/WordPress, the near future will only increasingly be React.
@asuh I’m curious if you think that will help React performance statistics at large, or if they’ll be similar moving forward!
@zachleat I feel like part of the issue is with the latter, there was something we were encouraging people to move *to*. The anti-React posts that usually hit my feed either don't say much more than “don't use React,” or focus on one specific use-case, leading their comments to get filled by people to whom the proposed alternative does not apply 😕
@ZMYaro perhaps part of the issue is that React was successful at overselling itself for *everything*—and if we are talking alternatives I’d rather not repeat the same mistake
@zachleat I absolutely agree with that. I just feel like anti-React posts would get more traction (and maybe not stop, but at least make it more obvious when someone is on a post xe is not the target audience of) if they did more to head off that pattern. Framing things more as, “If you're using React for [use case], you should really consider switching to [better alternative],” rather than, like you said, framing (maybe unintentionally) one alternative as the universal replacement for React.
@zachleat Like, “If you're making a static site, you should consider whether you need JavaScript at all, let alone React,” or, “If you are using React for encapsulated components, you should see what you can do with standard custom elements now without the overhead of React,” or something like that, could not just tell people to stop, but point them to alternatives. Like how it was, “Move from CommonJS to ESM,” not just, “Stop using CommonJS!”
@ZMYaro yeah, that all seems logical to me!
@zachleat I long since gave up working on the web front end. I just can't be doing with learning a whole brand new half-arsed "latest and greatest" set of frameworks every few months. (And they always will be half-arsed until someone throws away the browser as we know it and starts again.)