Coding interview preparation
5.75K subscribers
329 photos
47 files
163 links
Download Telegram
API Protocols
What do you understand by Virtual DOM?

Think of the Virtual DOM like a draft version of your web page. Instead of changing the actual page (which is slow), React updates this lightweight copy first. Then, it smartly compares the draft with the real page and updates only the necessary parts kind of like editing a document without retyping the whole thing.

Result? Faster updates, smoother performance, and a better user experience! 🚀
In C, if we pass an array as an argument to a function, what actually get passed?
Anonymous Quiz
21%
Address of the last element of array
44%
Base address of the array
21%
Value of elements in array
15%
First element of the array
Browser to Virtual DOM.png
37.2 KB
Virtual DOM works in three steps:

1. Whenever any data changes in the React App, the entire UI is re-rendered in Virtual DOM representation.
Virtual DOM and Real DOM.png
46.2 KB
2. Now, the difference between the previous DOM representation and the new DOM is calculated.
Real DOM.png
28.2 KB
3. Once the calculations are completed, the real DOM updated with only those things which are changed.
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Python Quiz
Anonymous Quiz
33%
A
35%
B
17%
C
15%
D
Please open Telegram to view this post
VIEW IN TELEGRAM