3 ms·
Agreed. There is no world in which React is faster than vanilla JS, except maybe certain contrived examples. Selling React as “fast” has got to be one of the g
by bigyikes 2y ago
Agreed. There is no world in which React is faster than vanilla JS, except maybe certain contrived examples.
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.
- mason_mpls 2y agoThe overhead of the virtual dom is less than modifying the actual dom unless you’re using little to no javascript. 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.