Skip to main content
zerotal

Documentation


Documentation / @zerotal/core / view

view

Server-side JSX views: the secure-by-default JSX runtime (SafeHtml), the page/layout authoring helpers, and the optional file-route resolver that renders .tsx pages automatically. All of this lives in core (the @zerotal/core/view subpath) so ctx.view() and the components it renders come from a single package. JSX children are auto-escaped by default; use safe/Raw to opt specific HTML out of escaping.

Example

import { defineLayout } from "@zerotal/core/view";

const wrap = defineLayout(AppLayout);
export const Home = wrap<{ name: string }>(({ name }) => (
  <main><h1>Hello {name}</h1></main>
));

Classes

Type Aliases

Variables

Functions

References

Html

Renames and re-exports SafeHtml