I monitor the first paint on many sites, and the more js the later the paint. None can beat a normal site with some js niceties that trigger on dom ready.
Selling React as “fast” has got to be one of the greatest bamboozles of all time. I know I thought it was fast when I first started.
It’s reasonably fast for what it does, but the overhead of virtual DOM diffing has real performance costs compared to vanilla.
React makes it really easy to make things slow. At my job it isn’t uncommon for a single list item component to take 2ms to render on a fast machine. Multiply that by a few dozen list items, and suddenly your feature is taking hundreds of ms to rerender. Sure, you can improve things with virtual rendering and targeted optimizations, but the default case is not fast.
It’s especially insane when you consider that video games can render a high fidelity 3D scene in under 16ms.
If your company’s front end that happens to have react is slow, I’m willing to bet removing react will make it even slower.
And like they said, for complex interactive parts they are not even using React!
Any other interactivity can be solved with few vanilla js snippets.
You can easily do no refresh behavior with turbolinks like approach.
I would understand if it was an actual web app, with tons of complex crud and other things.
So, we can only hire artisans who hand tailor every event handler, who writes bespoke careful updates that never conflict and always handle every corner case of the dom right? And you and your 63 clones that NYT has hired will all work in harmony & concordance doing your bespoke vanillajs practices.
Reacts vdom is pretty sweet. Even the old iterations of React can go eliminate a lot of paints. Old websites used to have plenty of write-read-write loops that internally block the dom, that react's lifecycle generally helps guard against. The article here talks about even further improved batch updating that React 18 can help with.
Apologies my attitude, but it's just remarkably how much rancis ass attitude there is about React & how fucking stupid it sounds. I know it's the internet, that people will forever be springing up to spout off, but it's so sad having such miserable negativity hounding such perfectly respectable tech.
NYT site is fast, but is broke as hell. Even turning off uBlock it downloads 10mb of assets before the fold and still doesn't work.
This is more salt of the earth reality, maybe you're projecting the snooty nose-in-the-air boutique'ness of React.
I generally agree that most sites are pretty bad, are way too big & usually with poor data-architectures (over fetching, re fetching, poor or no data caching). Data storage is notably something React nor very few other things have tried to tackle. GraphQL made a forray & for a while seemed ascendant but it's moment seems to be passing. The core issue of client-server model is still pretty informally handled.
But even that has nothing to do with the very obvious & bad issue, that many sites are loaded with obnoxious & heavyweight & surveiling ad payloads. But it's unclear to me again what React has to do with this. (Especially as few of these as systems use React.)