The DOM trees are huge nowadays. Since we are more and more pushed towards dynamic web apps (Single Page Applications- SPAs), we need to modify the DOM treeincessantlyanda lot. And this is a real performance and development pain. BTW. I myself managed to create a web page with a source...
This algorithm is known as a binary search, and because of that, the tree is known as a binary search tree. The search only takeslog2(N)time which means you can find a node by just comparing 4 values in a binary tree of 16 nodes(log2(16) = 4) Both Binary tree and Binary Sea...
Whenever aReactComponentis changing the state, we want to make as little changes to the “real” DOM as possible. So this is how React deals with it. TheReactComponentis converted to theReactElement. Now theReactElementcan be inserted to the virtual DOM, compared and updated fast and easily...