Skip to content

Latest commit

聽

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
聽
聽
聽
聽
聽
聽
聽
聽
聽
聽

README.md

VanJS Prerender

Author: binhtran432k

Prerender a VanJS tree to a static HTML string without using van-plate or minivan.

Install

npm install -D vanjs-prerender

Usage

import van from "vanjs-core";
import { prerender } from "vanjs-prerender";

const { a, div, li, p, ul } = van.tags

console.log(
  prerender(() => div(
    p("馃憢Hello"),
    ul(
      li("馃椇锔廤orld"),
      li(a({href: "https://vanjs.org/"}, "馃崷VanJS")),
    ),
  )),
);