Reason for learning React

Hello Guys,

Welcome to my blog!

I am started my new journey as a blogger.

Keep support me 🤩.

Let's start...

The basic skill set need for learning React is HTML, CSS, and JavaScript.

What is React?

React is a JavaScript library for building user interfaces.

Features of React: As react is widely popular, it has unique features listed bellow.

1.Uses JSX: JSX stands for JavaScript XML. It is simply a syntax extension of JavaScript. It allows us to directly write HTML in React within JavaScript code. It is faster than normal JavaScript. It makes it easier for us to create templates.

let's check practically...

With JSX:

import React from 'react';

const App=()=>{

return(

Hello Viewer's

)

}

export default App;

But, It requires Babel to convert code to JavaScript. Because browser will not understand JSX.

Without JSX:

import React from 'react';

const App=()=>{

return React.createElement("div", null,

React.createElement("h1", null, "Hello Viewer's"))

}

export default App;

In above code, we did not used JSX for writing code. But, if there is lot of nesting inside the elements then it becomes confusion.

2.Virtual DOM: Virtual DOM is like a lightweight copy of the actual DOM. So for every object that exists in the original DOM, there is an object for that in React Virtual DOM. It is exactly the same, but it does not have the power to directly change the layout of the document. Manipulating DOM is slow, but manipulating Virtual DOM is fast as nothing gets drawn on the screen.

3.One-way Data Binding: This feature gives you better control over your application. The connection between the data to be displayed in the view and the component’s logic is called data binding in React JS.

4.Component: A Component is independent and reusable code in React. Components make the task of building UIs much easier. You can see a large UI broken down into multiple individual pieces called components and work on them independently and merge them all in a parent component which will be your final user interface.

5.Performance: React.js use JSX, which is faster compared to normal JavaScript and HTML. Virtual DOM is a less time taking procedure to update webpages content.

These all are the advantages of React for building complex applications effectively and flexibly.

That's it for today guys...

Let's meet with another blog😀!

Â