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("🗺️World"),
      li(a({href: "https://vanjs.org/"}, "🍦VanJS")),
    ),
  )),
);