I agree react can be overkill for simpler websites
Why? The best part of React is that it's dead simple. The entire public API consists of about 10 functions, it seems perfect for a simple site to me.
I can't think of a simpler "framework" than React (from a consumer's perspective at least), and dealing directly with the DOM via "plain js" is a massively larger and more complicated API.
I guess it's not the best route if you're doing "progressive enhancement" type work, but if you're creating a javascript client, then React is just about as simple as it gets.
Because a significant number of people will fail to download the correct JS files, potentially because they've disabled Javascript, but more often because they're on mobile, travelling through a tunnel or otherwise failing to make that connection.
React is fantastic for complex web applications, although even then I would argue for a progressive enhancement approach wherever possible. However, for websites it is entirely unnecessary. Look at Rust's Crates site, which has been built with Ember, and now becomes painful to use on mobile because every time the site appears you've got to wait another two seconds for the page to load and the Javascript to run. If you're browsing a site, that wait is a massive turn-off.
A great thing about react is that server rendering is built into the core. (Render component to a string), so it's a much better experience for the user on a bad connection.
True. It's good to see primary rendering heading back to the server side rather than being yet another thing that the client is expected to reimplement.
5
u/defcon-12 Aug 28 '15 edited Aug 28 '15
Why? The best part of React is that it's dead simple. The entire public API consists of about 10 functions, it seems perfect for a simple site to me.
I can't think of a simpler "framework" than React (from a consumer's perspective at least), and dealing directly with the DOM via "plain js" is a massively larger and more complicated API.
I guess it's not the best route if you're doing "progressive enhancement" type work, but if you're creating a javascript client, then React is just about as simple as it gets.