Things you forgot (or never knew) because of React - Josh Collinsworth blog
If you don't often look beyond established comfortable defaults, you might be surprised to learn just how far the world of frontend has moved away from React, and how big that gap continues to grow.
A lot of what people use React for would be better handled with vanilla JavaScript
This week, we’ve been looking at harmful complexity in web projects, and why choosing React for mostly static web projects is bad.
These days, it’s common for mostly static websites to have a little bit of dynamic content.
And while React can add that content, it’s often the wrong choice. Let’s dig in!
The problem with React A lot of DOM interactions just don’t require that much JavaScript to work, but React adds tens of megabytes of code that needs to be downloaded, compiled, and parsed.
React is still absolutely terrible for web performance
One of the oft-repeated myths I hear from framework evangelists is that tools like React are better for performance because “they use a virtual DOM instead of the real DOM.”
First, that’s objectively false.
In certain situations (like UIs with comically large amounts of div nesting) moving DOM diffing to a virtual layer can improve the performance of that specific step. But eventually, they have to touch the real DOM. That’s how you manipulate and update elements.