These are the reasons behind React’s tremendous success.
1. Simpler Code with Fewer Bugs
It is so much easier to debug! Avoiding side-effects and embracing immutable values make finding problems in your code an order of magnitude easier.
On top of that, the React community has built an amazing set of developer tools, e.g. a debugger that lets you travel back in time.
2. React Is Blazingly Fast
It is actually much faster than manually manipulating the DOM, which is the reason why Flipboard has built their own React-Canvas library to achieve 60fps performance on mobile web.
3. It Plays Nicely With Your Existing Code
Facebook engineers designed React to integrate nicely with existing codebases. They have invested years into creating the Facebook site, so a complete rewrite just to be able to use React would not be justifiable.
4. Learn Once, Write Anywhere
Users spend 18x more time in native apps than on mobile web. Most products have to cover at least web, iOS and Android platforms to be successful today.
This usually means tripling the costs of software development as you develop and maintain each platform separately. In such diverse environment, it can be really tricky to provide a consistent experience for your users.
Hybrid apps might seem to be a solution. There is a lower barrier to entry, you can reuse your code amongst all platforms and it is much easier to maintain consistency with a single cross-platform team.
Unfortunately hybrid apps often don’t deliver a high quality user experience. And angering your users is risky business, because mobile users are unforgiving, which Facebook has learned the hard way.
5. Reactive Community Always Willing to Help
Facebook is going to great lengths to embrace community innovation. Speakers from competing technologies like ClojureScript, Cycle.js and Elm give talks at the official ReactJS conference. Some of the biggest innovations in React were actually inspired by ClojureScript, some were taken from Ember, and some came from Elm.
Whether it is ClojureScript, Elm, Angular or Ember, these great people are part of our “Reactive Community” and everyday remind us we should work together.
I’m stoked for what React, Angular, Ember, and many other friends are working on, and I reject the “us vs them” mentality.
— Dan Abramov (@dan_abramov) May 26, 2016
The React ecosystem is extremely focused on developer experience and productivity. The community has created an amazing number of tools and projects that help with writing better code. BabelJS, Redux, React Router, Immutable.js, React Native Playground, Flow, Relay, just to name a few.
Facebook itself has heavily invested into working with the community. They have hired the BabelJS and Redux creators, and invest resources into both projects.
Facebook is not the only big supporter of the React community. Yahoo, Mozilla, Airbnb, Netflix and other big companies use React in production and have supported community with useful open source libraries and tools.
7. It Will Affect You Anyway. Better Prepare for That.
It is impossible to run away from the ideas behind React. Both Angular2 and Ember have adopted some key ideas from React and the idea of a virtual DOM has made an even bigger impact in the functional communities of ClojureScript and Elm.
React.js is not just a library, it is a phenomenon that has forever changed the way we program. Don’t miss the train. Start looking into it today!
React is changing the way we build web, mobile and desktop frontends. Thousands of programmers are experiencing an invaluable boost in productivity thanks to React.
It is not the perfect choice for every project. But it might help you on your project, and you will likely encounter it more and more often. It is definitely worth your attention.