Introduction:
In this article, we discuss React JS. The Role of Front end developer is to develop a website in web and Mobile application. There are some rendering problems and multiple page problems in Javascript. To solve those problems facebook introduced React. React is a library, It is open source. By using react we can create Single page applications easily. It has virtual DOM , It produces high speed rendering. We can create a big website easily by using components. React has more support for front end developers to create a Dynamic website easily.
Table of Content
- What is React JS?
- What is React JS used?
- Features of React JS
- Advantages of React JS
- Disadvantages of React JS?
What is React JS?
React JS is the popular front-end Javascript library. It plays a major role in the field of Web development.
Many established companies and Newly startups companies most widely use React JS Like (Airbnb, Netflix, New York Times, Instagram).
It is created for building interactive and fast user interfaces for web and mobile applications.
-
For creating Web - React JS is used
-
For creating Mobile apps - React Native is used.
It is an open source component- based which is responsible only for the application view layer.
In Model View Controller (MVC) architecture, react js is only focused on only the view layer. It is responsible for how apps look and feel.
Why is React JS used?
-
Easy creation of dynamic applications
-
Improved performance
-
Reusable components
-
Unidirectional data flow
-
Both web and mobile apps can be developed.
-
Dedicated tools for easy debugging
Features of React JS
JSX
JSX stands for JavaScript XML. It is an XML or HTML-like syntax used in React JS. This is a javascript extension in ES6. JSX is not necessary , but we want to write HTML code in react JSX is recommended.
Components
The Heart of React Js is components.
React Js is fully based on the components and each component has its own logic and controls.
The code in these components can be reusable when we are working on large scale projects.
One-way Data Binding
ReactJS follows one-way data binding.
Giving better control throughout the application is the benefit of one-way data binding. If the flow of data is in another direction, then it requires additional features, this is because components are immutable (We cannot change the data).
Virtual DOM
It works like a one-way data binding. Whenever we make any changes in the web application, the entire UI is re-rendered in virtual DOM representation.
It checks the difference that occurs in the previous DOM and new DOM. Once it has done, the virtual DOM will update the things that have actually changed. This is making the application faster and there is no wastage of memory.
Simplicity
Simplicity makes the application to understand and simple to code. We already know that React JS is a component based approach which makes the code reusable as you need. This makes it simple to learn the code.
Performance
The Virtual DOM makes the component work smoother and increases the performance of the application.
Advantages of React JS:
-
Easy to Learn and code easily for the programmer
-
Creating Dynamic Web Applications
-
Reusable Component
-
Fast rendering
-
Good Performance
-
SEO friendly
Disadvantages of React JS:
-
In MVC controller, it covers only the view part layer of the application.