Logo
HTMLCSSJavaScriptReactjsnewContactUpdates

Get started today

HTMLCSSJavaScriptReactjsnewContactUpdates

Tools

Resume BuilderQR GeneratorVS Code Editor

Connect

GitHubWhatsApp Channel
react features
reconciliation and diffing

Real Dom and Virtual Dom

By Saket Bhatnagar•April 5, 2025•Intermediate

Table of Contents

  1. real dom and virtual dom

real dom and virtual dom

  1. 1Real DOM is the actual HTML structure rendered in the browser.
  2. 2Updating Real DOM is slow because it re-renders the entire page or large sections.
  3. 3Virtual DOM is a JavaScript-based copy of the Real DOM created by React.
  4. 4When state or props change, React updates the Virtual DOM first.
  5. 5React compares the updated Virtual DOM with the previous one (diffing).
  6. 6React finds the difference and updates only the changed part in the Real DOM.
  7. 7This update process is called reconciliation
  8. 8Using Virtual DOM improves performance by avoiding unnecessary Real DOM updates

Share this article

Last updated: April 5, 2025

Join Our Community

Login to Join

© 2025 Saket Bhatnagar. All rights reserved.

    ☕