Skip to content

Add SSR support 🎉

Compare
Choose a tag to compare
@UpperCod UpperCod released this 04 May 05:04
· 335 commits to master since this release

SSR 🎉

Example

import "atomico/ssr";
import { html } from "atomico";
import "./components";

const dom = html`<my-component>
    <h1>SSR</h1>
</my-component>` ;

dom.render() // serialized html

Observations

  1. The support is distributed as a module, so the environment of use requires ESM module support.
  2. To hydrate the shadow DOM it is required that the browser support template[shadowroot=open].
  3. This support is early but is still being developed as part of the CORE, for alignment with the next Atomico versions.