Get Simple Answers for These 10 FAQs about React.

Mohammad Hasan
3 min readNov 4, 2020

Are you a beginner level programmer? Then certainly your mind is full of questions. Today I am gonna help you to get a few answers about React.

So without wasting any of your time, let’s start our quest to get simple answers for these 10 FAQs about React.

The Simple Answers to Your Commonly Asked Questions:

So you are a novice web developer. You can create a web design with JS and React. But you still wonder about some of its basic details. Let’s go and clear out some of your doubts.

10 FAQs Relating to React:

Q1: What is the definition of React?

Basically React is a commonly used library. It is commonly used in JS language. The purpose of creating the react is to build a UI. here UI stands for= user interface.

It is a very small library. That’s why sometimes we need more libraries other than react to set up a solution.

What it does: React mainly builds user interfaces.

How it does: At first, react waits for our command. We then tell it what to do. After that, it will build an original UI.

Q2: How much is React effective for creating UIs?

Previously, only developers solely were responsible for creating UIs. But as React came along all the extra work was gone.

Now, all you have to is cite what you want. Then you can rely on the react for the rest of the work.

Q3: What is Stateful Components?

The stateful components are a type of class components. They have a state that gets booted in the constructor. It is a class-based component

What is does: These components are used to add any functionality. It can maintain a track of the changing data with the help of the state object.

How it does: It not only present the data it gets it also reacts as it is supposed to react after the data start working.

Q4: What are Stateless components?

As stated in the name these are the kind of components that do not have a state. They do not have any functionality.

What it does: We use these components to show things on the screen. They use the props and print out the input. Mostly they always render similar things.

Q5: Why we should learn the React language?

React is known for making the work easier for the developer. We can use this with any kind of developing language. We must never worry about creating a series of tasks.

If we want to make a list without react we must first create a DOM operation then start to apply several stages to work accordingly.

But with react you need not worry about those steps.

How it works: In react you just focus on creating the array and put it in the “state” of your application. Then the next step is to use the react language and ‘’command” to display in the UI.

Q6: What is a Virtual-DOM?

Here the DOM stands for the document object model. In JS we use DOM to create the Nodes. But the use of DOM makes our work slower.
If we make any changes in the program then the DOM reviews the whole program. This makes the process slow.

Q7: Why is a Virtual-DOM created?

Every JS DOM has it's personal representing Virtual-DOM. And every virtual-DOM has objects that are similar to the actual DOM.

Running any changes to the main DOM is complicated. The process is very slow To avoid these types of slowness programmers created a Virtual DOM. It works as a representative of the actual DOM.
It has the same features and elements. Also, the methods are the same.

As if it is a blueprint of the actual DOM.

How it works: The DOM has some pure JS elements. Whereas the Virtual-DOM does not have original elements. It has elements that represent the original DOM.

Q8: What is reconciliation?

When we work in the Virtual-DOM it gets updated. After that comparison phase, it also changes the actual DOM. And the screen also gets changed. This process is called reconciliation.

Q9: What are the commonly used component Lifecycle?
There are three commonly used lifecycles.
1. Constructor()
2. Render()
3.Component DidMount().

Q10: Which are the uncommon component Lifecycles?
There is two uncommonly used component lifecycle:

1. static getDerivedStateFromProps()
2. UNSAFE_componentWillMount.

--

--

Mohammad Hasan

Being a web developer has been my dream for many years.