Why choose React?

By | May 9, 2022

There are three popular frontend frameworks/libraries that you can choose from: React, Angular, Vue. The State of JS gives a great overviews of their popularities. Whereas React.js is popular and mature, Vue.js is gaining popularity as well.

I will not go into any further in comparisons between the three here, because in the end, people should choose based on different factors and experience the solutions (libraries/frameworks) themselves before making a final decision.

My top reasons for choosing React nowadays:

  • It’s JavaScript: It is true that writing React applications makes you a better JavaScript developer (https://www.robinwieruch.de/javascript-fundamentals-react-requirements/). You learn how to deal with classes (and inheritance due to extends), the functional programming paradigm with immutability, composability, pure functions and side effects; and language specific methods such as map, reduce and filter. Before I have been doing lots of Angular 1.x and never really experienced JavaScript the way I did when implementing applications with React. React has only a slim API and thus you have to deal with the JavaScript yourself. It only provides a small surface area to make you productive. Ask yourself: When you look 5 years into the future from now, would you want to have invested your time in learning a framework or the underlying language (JavaScript)? I would always choose the latter, because no matter what comes after React, you are prepared for it.
  • It’s Ecosystem: React has only a slim API and only provides the components and their local state management. But the ecosystem around React provides everything else. For instance, you are in charge of choosing the best fitting library to fetch your data from a remote API. Should you use the native fetch browser API, install an external yet minimal library like axios, or Apollo Client for GraphQL API’s instead of REST APIs? It’s up to you. You provide the building blocks to advance your application; not the framework or the people behind the library/framework. It gives you lots of flexibility in how to compose your tech stack and how to utilize the power of different libraries. Only using another tool such as Firebase makes all the difference to build large scale applications only with two techs in your tech stack. It also makes the ecosystem around React such an innovative place, because every day people invent something new. Ask yourself: Do you want to stay in your comfort zone and just get shit done with a framework or do you want explore new things, challenge the status quo and yourself, and grow as your learn these new things on the way? I would always choose the latter, because being a developer means to keep up with the tech you are using every day.

Both of my top reasons to choose React are also seen as disadvantage by many folks who are used to have a stable framework which comes with an encapsulated ecosystem itself and shields away all the JavaScript. In the end, it’s a matter of taste as stated previously. So try your favorite tech yourself in a minimal application yourself and just choose what feels best to you.

Leave a Reply

Your email address will not be published.