3 ms·
> The virtual dom seems quite nice since it avoids the text parsing stage that a traditional template language might imply. Probably 90% of users use JSX, so t
by Touche 11y ago
> The virtual dom seems quite nice since it avoids the text parsing stage that a traditional template language might imply.
Probably 90% of users use JSX, so that need is the same.
- strmpnk 11y agoThat's not quite what I meant. By text parsing, I mean sending a big string to the DOM like: elem.innerHTML = "<p>Example. Please parse me.</p>"; That's going to take more time than carefully constructing elements and reusing things judiciously.
- Touche 11y agoThat's not how most templating languages work any more, they parse them into DOM elements and do minimal updates like virtual dom libraries.