I am learning about React internals from a talk by Paul O’Shannessy "Building React from scratch"
In "7:29" before explaining how rendering process work, he added these few lines of code which i really couldn't understand
const ROOT_KEY = 'dlthmRootId";
const instancesByRootId = {};
let rootId = 1;
function isRooot(node) {
if(node.dataset[RootKEY]) {
return true
}
else {
return false
}
}
He said that we need to make sure that no roots conflict!
I can't understand this part, what roots to conflict, is this related to server side rendering? or rendering to multiple roots instead of one root node in the app?