This is a very challenging space with multiple moving parts. React is not super friendly to DSD when hydrating. The Lit team has created packages to try to make things "play nice" but as we shall see, this is not smooth sailing.
Heres a simple Lit element component that we register as my-web-component.
import { LitElement, html, css } from "lit";