back

by pier25·9y ago·view on hn ↗
> Anyway, besides the recruiter app, is LinkedIn really worthy of a SPA experience?

In some cases it makes sense, but very few websites really need to be SPAs yet everyone these days is using React, Angular, Ember, etc.

Facebook created React to not depend on other frameworks. They also added HTML and CSS into JS because their application is huge and complex. At their size it makes sense to have all the bits needed to work on something in the same place. Redux, same thing. It's a solution that is intended to solve problems at the 1B users scale.

The truth is 99.99% of web applications won't come close to that level of complexity, but devs insist in using solutions React and Redux because... hype? It's like driving with a school bus to carry 1 person. Dan Abramov has said himself that it doesn't make sense to use Redux until you need it.

Same thing with all those JS UI benchmarks. There must be a use case for rendering and doing data binding in 10000 UI elements at 60 fps, but those are very rare edge cases.

I'm guilty of this myself. I've spent 2016 working with React on a few SPAs and I have to admit I only got in it or the hype. Everyone was doing it which must mean it's the best way to go, right? Wrong.

I'm moving away from SPAs in 2017. Going back the classic route of generating dynamic HTML in the server and sprinkle pages with JS "widgets" whenever I REALLY need those UI enhancements.

If I need an SPA for a particular use case, sure I'll do it, but not as a default option.

Edit: In mobile SPAs makes even less sense. Sure you may be reducing requests, eventually, but the CPU usage is bigger and the initial load is also bigger. And sure, you can really optimise an SPA but this adds complexity on top of complexity.

Sites like HN and Reddit have proven that content is king.

1 comments
React and redux don't have to be a part of a SPA. You can have server-rendered pages with some react-based widgets on them. I think react and redux is great for that kind of stuff - I know I enjoy building widgets using react and redux as opposed to jQuery.
In that case why not use something more lightweight such as Vue?