Why should you learn React ?

Malia Mahdaoui
WTM Algiers - We Write
5 min readApr 29, 2021

Whether you’re a javascript lover or not, whether you want to learn about a library or a framework that will make your life as a developer much easier, or for instance you want to embellish your GUIs and your code in particular, or you’re just inquisitive and want to get a quick overview of react, this article is for you!

What’s great about React ?

This article won’t be following an academic approach, I assume there is enough academic content on such a well known technology as React on the web. Nevertheless, we still need to clearly define the general context. So what’s React?

React is a JavaScript library created by Facebook allowing to easily create interactive GUIs (Graphical User Interfaces), to better define views corresponding to each state of your application, and to optimally update components relevant to a changing state or data. In other words, this means that React makes the creation of SPAs (Single Page Applications) a breeze.

  • SPAs and VDOM

Before further praising React, let’s stop for a while on the word SPA which is one of React’s gifts to its enthusiasts. Basically and briefly, a single page application or an SPA is an application that doesn’t need to reload the page while running and works within a browser. Thus, it dynamically rewrites the current page, rather than loading an entirely new page from the server. In fact, just think about the way you publish a new post on Facebook or Twitter, or the process of sending an email, or even consider your activities and the modifications you frequently make on Google Drive, the only change you notice is on the changed elements, anything else will remain unaltered, these interactions wouldn’t have been so smooth if the above mentioned apps weren’t SPAs and obviously they would have taken much more time to perform.

If you find this cool, React allows you to build applications with exactly the same logic. This means in technical terms, instead of manipulating the browser’s DOM directly, React creates a virtual DOM (VDOM) in memory which is a lightweight representation of the real DOM, where it carries out all the necessary modifications, before performing the changes in the browser’s DOM. If you do not know what a DOM is, I highly recommend you to learn more about this concept.

  • Components

Another key feature of React is that it’s a component-based technology, it’s a method which encapsulates the individual elements of a larger UI ( AKA components) into small and independent microsystems. No panic! that just means that you can create a multitude of autonomous components that keep their own state, then put them together to make a whole page, or even sophisticated user interfaces.

  • JSX

And there is no way not to mention JSX when talking about React! which is one more key feature and a major addition for React developers! JSX stands for JavaScript XML and it simply allows you to write HTML in React. In other terms, JSX is an HTML-like syntax that you can use with React to technically make building React components much easier and more intuitive. If you’re a javascript developer and starting to use React, you will notice that creating large and nested HTML documents with standard JS syntax would be very tedious and tiring, and JSX actually makes this process simpler.

  • High Performance

As React uses VDOM, it renders web applications much faster than those developed with other front-end frameworks such as AngularJs for example. And the component-based architecture of React makes it possible for multiple users to work concurrently on each component, which speeds up the development time, and obviously splitting the complex UIs into individual components makes your code more readable, more scalable, more predictable and easier to debug, which makes React highly performant.

  • One-way Data Binding

React’s one-way data binding keeps everything modular and fast. A unidirectional data flow implies the fact that when building a React application, we often nest the child components into the parent components. Thus, it’s not hard to know where and when an error occurs, in other words, this concept makes React apps easier to debug and allows the users to better control their web application.

  • Debugging

Speaking of debugging, React applications are easy to test thanks to a large community of active users and all the React features and tools.

As the creator and the designer of this technology, Facebook offers a small browser extension that makes debugging the React application quick and easy.

Conclusion

In conclusion, it is fair to say that React is a very feature-rich technology and brings together several tools that make the developer’s life easier and coding more interesting and enjoyable. It is more robust than many other UI development frameworks, which is why it’s increasingly being adopted and used by more and more companies in their production environments, not to mention that React is served by a large community of active and skilled developers. If you are convinced and about to start your learning journey, you may be wondering whether you need to go through Javascript first and have some experience in this language, Well, not really, you just need to have general knowledge and to know the basics of it, then you can directly start learning to develop with React, in other words, you don’t need to develop web applications with pure javascript to start with React.

--

--