Recently, I looked at Facebook\'s React framework. It uses a concept called \"the Virtual DOM,\" which I didn\'t really understand.
What is the Virtual DOM? What are
Let's take an example — though a very naive one: If you have something messed up in a room in your home and you need to clean it, what will be your first step? Will you be cleaning your room which is messed up or the whole house? The answer is definitely that you will be cleaning only the room which requires the cleaning. That's what the virtual DOM does.
Ordinary JS traverses or renders the whole DOM instead of rendering only the part which requires changes.
So whenever you have any changes, as in you want to add another