| It seems like no one asks "Just because we can use Javascript for everything, should we?" Pros:
AJAX for loading content makes requests smaller making your app more performant. Cons:
The Javascript framework requires a 1xx KB download before content can be rendered, making your app less performant, hurting SEO, and breaking the back button (no, I don't want to scroll again from the top through the 5 posts I already read when I come back to your site). You hate maintaining an entire application in Javascript so you get to learn all the joy of transpilers and a build system to build whatever not Javascript language you chose and your tens of module dependencies because you decided everything had to be done in Javascript or TypeScript or ES2015 or CoffeeScript or ES7. Oh and when a new language supersedes the language you decided to use, you happily spend weeks moving your codebase to a new language, thinking "Wow static typing in 2015?! My code is so much more maintainable now!" It says it all that the benchmark for comparing frameworks is TodoMVC, a simple CRUD application for which client side rendering is unnecessary. People are not thinking at all about the pros and cons of client-side rendering and reaching for it for any web applications. Google doesn't use AngularJS for Gmail. They use GWT to render HTML on the server. Side note: AngularJS 2 beta is 500KB. Fucking laughable. Oh and they suggest loading both the AngularJS 1 and AngularJS 2 frameworks on your page to help you migrate. Facebook doesn't use ReactJS for Facebook. They use PHP to render HTML on the server.
Edit: Yes Facebook uses ReactJS for a lot of side stuff, but not for big items like their newsfeed. Twitter doesn't use client side rendering. They tried it but reverted, because the time to first see the content was too long. People are building a mountain of abstractions and investing so much time to over-engineer everything in Javascript. WHY?! |
This is false. Facebook is a huge user of React—it's one of their "pros" over Angular (which Google doesn't use as much).
The entire Instragram site is built with React, and all new development is with it[1], as well as parts of their existing UIs[2]. They are gradually replacing everything with it because redoing the whole site at once is impossible to do. They are also putting a ton of work into React Native and use it in some of their products [3].
Facebook seems to put some of their smartest engineers in the React and React Native teams as well as related projects like Immutable.js, and grab talent as quickly as they can (like Dan Abramov). It's silly to think that they're spending so much money on it for nothing.
[1] https://www.quora.com/Who-is-using-Facebook-React
[2] https://groups.google.com/forum/#!topic/reactjs/5K4fXu1aCTs
[3] https://facebook.github.io/react-native/showcase.html