Hacker News new | past | comments | ask | show | jobs | submit login

> I honestly don’t know why you’d want to not use it

It’s big and it’s slow when compared to other frameworks and particularly when compared to no framework at all.

I think the important takeaway is that there is no single answer here: different sites have different needs. If you’re making a highly interactive site people will sit on for a long time (say, Gmail) then React’s downsides will matter very little. But if you’re making a “one and done” single page, or a site where the vast majority of the page is static content (e.g. a blog) React is wasteful: a wasteful addition to the page download size and a wasteful process of serialising prop data and hydrating a bunch of components that never see their content change once. It doesn’t matter a whole lot on a desktop machine but try profiling on a low powered Android device, the Chrome performance burndown chart is sobering reading. Even on the server, too… I’ve run into issues before now running React SSR on high traffic web sites.

When making a highly interactive web app a framework like Svelte is smaller, performs better and is a joy to use (a matter of opinion of course). At the very least I’d ask “why not Preact?” when starting a project: it does 90% of what React does at a tiny fraction of the size. That Facebook hasn’t made any meaningful progress in shrinking React shows that it isn’t really a priority for them.




So what’s an alternative to react for simpler websites like blogs? Surely the answer isn’t to just go for vanilla js and html? There’s a lot of differences between browsers and a lot of abstraction that lets me just get to work in react. I’ve built a couple of blogs, using react for the frontend, and I didn’t see anything wrong with that.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: