Virtual DOM

From Wikipedia, the free encyclopedia

A virtual DOM is a lightweight JavaScript representation of the DOM used in declarative web frameworks such as React, Vue.js, and Elm.[1] Updating the virtual DOM is comparatively faster than updating the actual DOM (via js). Thus, the framework is free to make unnecessary changes to the virtual DOM relatively cheaply. The framework then finds the differences between the previous virtual DOM and the current one, and only makes the necessary changes to the actual DOM.[2][3]

Svelte does not have a virtual DOM, and its creator Rich Harris calls the virtual DOM "pure overhead".[4]

Related techniques include Ember.js' Glimmer and Angular's incremental DOM.[5][6]

References[]

  1. ^ "Beginning Elm". Elm Programming. Retrieved 2020-12-11.
  2. ^ "Virtual DOM and Internals – React". reactjs.org. Retrieved 2020-12-11.
  3. ^ "React: The Virtual DOM". Codecademy. Retrieved 2020-12-11.
  4. ^ Dec 27 2018, Rich Harris Thu. "Virtual DOM is pure overhead". svelte.dev. Retrieved 2020-12-11.
  5. ^ google/incremental-dom, 2020-12-08, retrieved 2020-12-11
  6. ^ "React Virtual DOM vs Incremental DOM vs Ember's Glimmer: Fight". Auth0 - Blog. Retrieved 2020-12-11.
Retrieved from ""