2 ms·
Shadow DOM will allow browsers to optimise their rendering code to re-render encapsulated DOM subtrees independently of each other. Virtual DOM makes sense whe
by jarek-foksa 11y ago
Shadow DOM will allow browsers to optimise their rendering code to re-render encapsulated DOM subtrees independently of each other.
Virtual DOM makes sense when (A) you have a huge tree and (B) you show only a small portion of that tree to the user at any given time.
For example a long scrollable list or a multi-line text editor would be better implemented with virtual DOM, but using it everywhere is an overkill.