Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


React 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.


Indeed. 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.


Your 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: