ReactJS Interview questions

Total available count: 9
Subject - JavaScript Frameworks
Subsubject - ReactJS

What do you understand by Virtual DOM? Explain its working.?

The virtual DOM is an in-memory representation of the actual DOM. It has the elements, attributes, and content as Objects and their properties. The Virtual DOM saves time from unnecessary DOM modifications. React has the application state represented as a Virtual DOM and below are the steps that React performs when the application state changes,

1. Auto-generate a new Virtual DOM that represents the application state

2. Compare the old (current HTML DOM) vs the new Virtual DOMs

3. New operations will be mapped into the same HTML DOM operations

Note:- The Virtual DOM is only a copy of the original HTML DOM


Next 4 interview question(s)

What is JSX?
What are the major advantages of React?
What are the Pros and Cons of React?
What is React?