If you are involved in the world of web development, you have surely heard of the famous ReactJS, which is a JavaScript library created in 2011 by Facebook. In this article, I will explain to you some reasons why you should use ReactJS if you are a web developer.

The first reason is that it´s a Facebook library, created by Jordan Walke in 2011. At first, it was just a library that Facebook used to develop its own application (facebook.com), but in 2013 it decided to make it open source. Since then, ReactJS has had a very rapid growth and has created a very powerful development ecosystem.

More and more companies and developers have adopted React, mainly because the library is fully supported by Facebook. The library is currently at version 16.4, thanks to the fact that Facebook has not stopped investing in React (and will not stop doing so for a long time). This means that all projects using React have long-term support by default.

When we decide to use a framework or a library, everything could be beautiful at the beginning, but suddenly the developers decide to do crazy things like re-create the technology from scratch (like it happened with AngularJs) or modifications that harm existing projects.

Changes in libraries and frameworks are very common and even understandable (sometimes), but Facebook has built its entire application with React and knows very well that making large changes to its library implies a lot of cost and effort to keep its application updated.

That's why they create codemods (library or tool that automates or facilitates the update of the project to the new version), which benefits all developers. For developers, using React in their project means not struggling with version updates.

Another important benefit is that it uses pure JavaScript. If you have used frameworks like Angular, VueJs or Ember, you will quick realize that React works differently from those frameworks. Other frameworks have their own templates to perform typical tasks like traversing a list (*ngfor, v-for), having to learn new “tags”. To loop through a list in React, you don't need a template, you use the famous JavaScript map operator. The more you know JavaSciprt, the better you become at React.

Another important advantage is that it is component focused. Each component represents a piece of UI (user interface) in the web application. That component can be dumb (without logic) or smart (with logic), depending on the use you want to give it. If you want to create a component that takes care of displaying the profile picture, you use a dumb component. If you want to create a component that acts as a player by saving and controlling a video or music state, you make it smart by adding logic to it. A React component is fully isolated from its own HTML, CSS, and JavaScript file, making it easy to maintain and reusable.

If you want to use React in an existing project, you can start by creating very small components and add them little by little. This is a great advantage; it doesn't matter if your project is built on Angular, VueJs or another framework, React offers you the freedom to integrate it anywhere.

Also, ReactJS is very flexible. When you decide to use a framework, it is worth noting that frameworks usually come with built-in features like tests, HTTP connection, Navigation (Routing), internationalization, Animation and Form validation. With React, you can choose from several options (libraries) to support the function you need. There is a very large ecosystem, supported and documented in React.
Another really awesome pro from React is that you can create native mobile applications.

All the knowledge you have learned from React regarding web development(click here), you can apply it to mobile development. There is a library called ReactNative that allows you to develop Android and iOS applications natively through the approach that React handles: components. Mobile apps like Facebook, Uber and Instagram are developed and maintained with ReactNative.

Do I no longer have to use Java, Kotlin, or Swift to develop apps if I use ReactNative? Yes, you still have to use those languages to access platform APIs (databases, cameras), but you'll save a lot of time creating UI and non-platform dependent logic.

With ReactNative you will be able to take advantage of your web developers for creating your app and it is a highly recommended choice for startups and companies with few resources that want to develop their apps (on Android and iOS).

It is worth noting that React has more benefits like ease in testing, very good community and good performance. React is a library with a great future that has made developers very happy. This library allows you to create a readable, clean and easy to maintain project in a matter of minutes.

Views: 5

Comment

You need to be a member of On Feet Nation to add comments!

Join On Feet Nation

© 2024   Created by PH the vintage.   Powered by

Badges  |  Report an Issue  |  Terms of Service