A virtual DOM is a lightweight JavaScript representation of the Document Object Model (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 JavaScript)[2] . Thus, the framework is free to make necessary 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.[3] [4]
Svelte does not have a virtual DOM, and its creator Rich Harris calls the virtual DOM "pure overhead".[5]
Related techniques include Ember.js' Glimmer and Angular's incremental DOM.[6]