React's virtual DOM compares the new UI state to the previous one and applies only the changes. Fast, but not free. Modern frameworks (SolidJS, Svelte) skip virtual DOM entirely and compile to direct DOM updates — often faster still.
Virtual DOM
Also known as: vDOM