Learn some important basics before — Starting React.js

MD.JAHIRUL ISLAM
3 min readNov 4, 2020

--

1.What is React.js?

React.js is a JavaScript library helps to create interactive single page web application. It allows the user to create reusable UI components. Large type of web application can be built with React.js which allows the use the website without reloading the whole application.

2.Library VS Framework?

The difference between Libraey and Framework lies in term called “Inversion of Control”. When you use a library, You are incharge of the flow control but when you use a framework , The framework takes the flow the control.

3.How does React.js work?

To render dynamic data into the browser we need two things, one is data and another one is Html template. In React.js, React takes the data and combinds it with the Html template then creates a duplicate copy of the DOM,then renders it into the Virtual DOM and the browser shows the data to the user interface. If new data comes it does the same thing and it only renders the new element to the DOM without rendering the whole data.

4.What is DOM?

Dom means Document Object Model. When a web page is loaded, the browser creates a model of the that is called Document Object Model. The Document Object Model is constructed as a tree of Objects .

Here you can see how the browser creates the DOM as a Object of tree.

5.What are the features of React.js?

  1. JSX
  2. Single way data flow.
  3. React Native.
  4. Virtual Document Object Model (Virtual DOM)

5.Single Page Web application.

6.Why to use React.js?

it is component based, it has well defined life cycle, the use of simple JavaScript makes learning react very easy. We can make large and prfessional web application not only for desktop but also mobile devices. The special syntax calledJSX uses Html and JavaScript and mix them and helps the coder to create dynamic data.

7.What is Virtual DOM?

Virtual DOM is the copy of the Original Html DOM created by React at the time of rendering data to the original DOM. Every time when new data needs to be rendered React creates Virtual DOM and then renders it to the original Html DOM.

8.What is JSX?

JSX is the Html template created using the html tags, then the template is rendered as Component to the the virtual dom. As this html template is created in javaScript file thats why it is called JSX.

9.What are Components?

React is component based web application. At the time of rendaring data in DOM all the components are rendared through the virtual DOM. Whatever we show in the the browser are made of components. All the JSX that are being rendered in the DOM is called Component.

10.What are Hooks in React.js?

Hooks are used to state management and maintain side effect in function component.

There are few hooks in React -

  1. State hook.
  2. Use hook.

--

--

MD.JAHIRUL ISLAM

I am an experienced front end web developer , love JavaScript , write code, make things possible with code