4 ms·
You of course don’t need 10MB of JS for a React blog or 120MB for an e-commerce site. You’re not mad at SPAs, you’re mad at bad developers.
by robertoandred 1y ago
You of course don’t need 10MB of JS for a React blog or 120MB for an e-commerce site.
You’re not mad at SPAs, you’re mad at bad developers.
- martinald 1y agoBut even the most well optimized nextjs/react 'blog' or ecom site performs and order of magnitude worse than a SSR version, simply because you have to bring in runtime stuff? I'm giving extreme examples; but I've seen very very able development teams totally shoot themselves in the foot with this.
- robertoandred 1y agoNext/React sites can be SSRd just fine. If a db call is slow it's going to be just as slow for a PHP page as for a React page.
- martinald 1y agoBut even if you SSR them you still need to send at least 100KB (and probably far more) of JS down to the browser to hydrate state and handle any interactivity.
- robertoandred 1y agoYou need JS to handle interactivity no matter what. And 100KB is nothing, a single image is larger.
- martinald 1y agoDo you? On a blog? 100KB of JS is not the same as an image. Image can be downloaded and decompressed in microseconds even on a slow device. 100KB+ of JS can take a lot longer.