@b9g/crank/standalone #

Single-import module that re-exports everything from the core @b9g/crank module, the JSX template tag functions, and both renderers.

Installation #

npm install @b9g/crank
import {jsx, renderer} from "@b9g/crank/standalone";

Exports #

Quick start #

import {jsx, renderer} from "@b9g/crank/standalone";

function Greeting({name}) {
return jsx`<p>Hello, ${name}!</p>`;
}

renderer.render(
jsx`<${Greeting} name="World" />`,
document.getElementById("root")
);

Why use standalone? #

The standalone module lets you write Crank components without:

It's great for:

For production applications with many components, using a proper JSX transform is recommended for better developer experience and tooling support.

Edit on GitHub