3 ms·
I never said it was necessary. I am mainly pointing out that there are similarities in the mental model of the original comment and the virtual dom. Of course t
by strmpnk 11y ago
I never said it was necessary. I am mainly pointing out that there are similarities in the mental model of the original comment and the virtual dom. Of course there are many ways to get results.
The virtual dom seems quite nice since it avoids the text parsing stage that a traditional template language might imply. regardless, you kind of make my point. A system like mustache is not all that different from how input and output are considered, regardless of whether it's on the client or server. Same with a virtual dom, which runs quite fine on the server side when generating HTML for response content.
- 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.