With the React virtual Dom, I understand the subtree part, or at least I think I do: React will only re-render from components that had their setState called, and potentially all children of these components. i.e. components that haven't had their setState method called, nor are children of a component that did, are safe from re-render.
The part I'm unclear of, is when React does its reconciliation process on these nodes, what exactly is it comparing? I believe at this step in time we have a newly generated virtual dom tree, but does it compare this to the old virtual DOM tree, and then apply those changes to the actual DOM, or is this reconciliation process done between the newly generated virtual DOM, and the actual DOM directly?
Depending on the answer to the above, I might have a follow up question. Thanks!