DEV Community

Lorenzo Zarantonello for This is Learning

Posted on

10 2

React & Vue Virtual DOM vs Shadow DOM - Summary

It is a bit like the differences between Java and JavaScript!

Virtual DOM

  • a copy of the entire real DOM and is implemented on top of browser APIs.
  • used by libraries like React and Vue to address the problem of changing the DOM while keeping optimal performances.
  • plain JavaScript apps don’t use the virtual DOM.

Shadow DOM

  • inherent in web components and browser APIs.
  • a piece of DOM that is “fenced” in its own web component.
  • might be used while using libraries like React and Vue, or frameworks like Angular.

More Info

This is a super short summary of a longer article that I published on Medium.
You can find the article at React Virtual DOM vs Shadow DOM: What’s the Difference?

I am experimenting with this straight-to-the-point summary.
Let me know what you think!

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more