What it demonstrates
A click updates one small component state. The value, its doubled, parity and distance derivations, the gauge, button states and the history feed all recompute and patch together through Lit's declarative render cycle.
Lit Counter
Lit renders the custom element on the Worker and hydrates the same shadow root in the browser. No framework compiler is involved.
A click updates one small component state. The value, its doubled, parity and distance derivations, the gauge, button states and the history feed all recompute and patch together through Lit's declarative render cycle.
The Worker emits Lit's hydratable declarative Shadow DOM. The browser resumes that exact tree and attaches listeners without replacing the server-rendered first paint.