[**Documentation**](../../../README)

***

[Documentation](../../../README) / [@zerotal/core](../README) / 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](functions/safe)/[Raw](functions/Raw) to opt specific HTML out of escaping.

## Example

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

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

## Classes

- [SafeHtml](classes/SafeHtml)

## Type Aliases

- [FC](type-aliases/FC)
- [Children](type-aliases/Children)

## Variables

- [VIEW\_COMPONENT\_SYMBOL](variables/VIEW_COMPONENT_SYMBOL)
- [VIEW\_COMPONENT\_PROP](variables/VIEW_COMPONENT_PROP)

## Functions

- [registerViewFileRouteResolver](functions/registerViewFileRouteResolver)
- [definePage](functions/definePage)
- [safe](functions/safe)
- [esc](functions/esc)
- [Raw](functions/Raw)
- [defineLayout](functions/defineLayout)
- [Fragment](functions/Fragment)

## References

### Html

Renames and re-exports [SafeHtml](classes/SafeHtml)
