How React Virtual DOM Works
How React Virtual DOM Works
Virtual DOM works in these steps:
- Whenever any underlying data changes, new virtual DOM representation will be created.
- Then the difference between the previous DOM representation and the new one is calculated.
- Once the calculations are done, the real DOM will be updated with only the things that have actually changed.