Why our team moved forward with React
Here are the top reasons why we chose React over the alternatives:
- Easy to start with.
You can create something simple within a day after learning the tutorial. Of course, for complex projects you have to learn other technologies in React ecosystem and have a decent hands-on experience with React (as with any other technology), creating something small is really simple. We had such an experience for small SPA application which is currently in production and were happy with our choice.
- You can add necessary frameworks incrementally as your application grows.
Need just simple UI? Use plain ReactJS. Need shared state management? Add Redux. Need to handle server requests within Redux actions? Use redux-thunk. If you have to handle complex asynchronous scenarios, like canceling server requests (or, to be more precise, discarding results), combine different async actions, throttling etc., use RxJS and redux-observable.
The main point here is that the architecture of React world is really pluggable, so you can use only what you need to and add other stuff later on.
- React is very popular.
Hiring trends puts React in the first place (source), 80k stars on github — developers want to work with it, which means many people with that skill on the market, as well as eagerness to learn it for Junior Devs.
- Mobile. You can write entire mobile application (iOS/Android) in React-Native with native look & feel.
Also, there are technologies like Expo, which streamlines the development process even more. You could write your first test application in a day or so; we have our application written in React-Native/Expo and it really worked well for us.
- React is production-tested on a massive scale.
Netflix uses React for their products. And if you think about what challenges do they face (millions of different devices, including slow smart TVs etc.), that means that it could be a good fit for your application too.
- React is functional.
React architecture is not built like traditional MVC architectures for server-side rendering. It does not have “controller” class that orchestrates the entire communication and business logic. To fully understand React, you need to shift your way of thinking towards functional programming. It might be hard to do if you’re used to OOP and have little experience in FP, but it is worth it, because FP naturally fits for the client side UI. Modern UI is reactive — you have to deal with lots of asynchronous actions like user inputs, server results, device events and so on. It is easier to do this with RxJS and React combined because of their pipelines and component-based structure.
With all that said, please keep in mind that it might take you some time to really grasp React if you’re choosing the framework for a big complex application and have little experience with creating modern front-end UI, so React is definitely not a silver bullet. Ideally you should have somebody experienced in React to help the rest of the team and to avoid baby mistakes. But once you “get” it, you can move forward very quickly.