What is React?

By: Iván Mauricio Diaz

Technology


blog/ What is React?
01 February 2020

Any website that wants to stand out on the internet must have an excellent FrontEnd, which is the part of the website where users interact. Nowadays, the FrontEnd has become indispensable for the success of a website as it is responsible for offering an excellent user experience, such as providing friendly interfaces and collecting data as quickly as possible. Of course, there are many JavaScript libraries and frameworks responsible for this, such as Angular and Vue.js. However, there is one in particular that has stood out considerably above the rest, which is React.js.


r2


React.js is an open-source JavaScript library focused on building user interfaces, essential parts of the FrontEnd. It was created by Facebook, the organization that also maintains it and provides technical support. This library is built on three pillars:

  • Declarative: It means that React has the functionality to create more dynamic user interfaces capable of managing a lot of data. On the other hand, declarative views can be designed with easy and simple code.
  • Component-Based: React allows creating custom components that make up various parts of the interfaces such as the header, body, or footer.
  • Learn Once, Write Anywhere: The best pillar since React can work and integrate with different technological tools like Python and PHP.

Thanks to these pillars, React.js has become a very easy-to-use tool, and therefore, very loved by web developers. Examples of famous websites that use React.js are: Facebook, Instagram, and Netflix.


How to use it?


To use this powerful library, it is necessary to have basic knowledge of **Terminals** to install packages and have the **NODE.JS** environment already installed. On the other hand, it is recommended to use Visual Studio Code.

Without further ado, let's continue.

  1. We go to a terminal like the Windows cmd and install React by typing the following code:

npm install -g create-react-app

  1. Then in the folder where we are going to create the project, we execute the following line of code where you will put the name of your project in the part that says “projectName”:

create-react-app projectName

  1. Then we start the application with the following code:

npm start

Finally, the application will run by default on port 3000. Therefore, we go to any browser and go to the following address http://localhost:3000 There you will see the React App running.

r3

Of course, the above is just the beginning. To learn more about React and exploit its functions, it is recommended to visit the official React.js site https://reactjs.org/


React Native


Within the world of React, there is a framework widely used for mobile applications known as React Native. It is quite attractive because it creates native mobile applications for Android and iOS without the need to use a browser. All this using JavaScript and React to maintain native components for each platform while reusing the same code.

r4

On the other hand, React Native allows the programmer, through the Hot Reloading application, to see changes in the App without the need to compile the code as in other tools for mobile Apps.

Indeed, React Native has become a Framework widely used in the mobile world. We can find the following successful cases: Skype, Instagram, Facebook, Uber among others.

Just remember, if you want to learn how to use this wonderful tool, it is recommended to have a foundation in React.js and Redux.

Finally, to learn more about this framework, you can visit the official documentation and blog of React Native at the following link https://facebook.github.io/react-native/


Want to know more?
Schedule a call!
Contact us on WhatsApp !