3 ms·
Is this correct? React doesn't use the virtual DOM to create HTML-like elements, it uses JSX for that, and JSX is optional. As far as I know the virtual DOM is
by colinramsay 12y ago
Is this correct? React doesn't use the virtual DOM to create HTML-like elements, it uses JSX for that, and JSX is optional. As far as I know the virtual DOM is used to avoid updating the "real" DOM in the browser when you don't have to.
- marknutter 12y agoReact does use a virtual DOM, namely so that it can efficiently track changes to the DOM. That's different than the shadow DOM that web components use, though, where they have their own sandboxed DOM that's completely isolated from the parent DOM.
- TeeWEE 12y agoIndeed. That's what i try to say. I think the knowledge regarding the shadow-dom and true standards-based web-components is not widely spread yet among devvers.
- colinramsay 12y agoYour first sentence is pretty much just a shorter version of what I said in my comment! The shadow DOM and React's virtual DOM are completely unconnected.