import { LivePage, action, component, defineApp, page, state } from 'redweb'; import type { Child } from 'redweb/jsx-runtime'; interface CardProperties { title: string; children?: Child; } const Card = component(({ title, children }: CardProperties) => ( {title} {children} )); @page('/jsx', { css: 'components.css' }) export class JsxPage extends LivePage { @state() count = 0; @action() increment() { this.count += 1; } render() { return ( Redweb JSX Plain TSX, escaped by default, with no browser framework. Count {this.count} ); } } if (require.main === module) void defineApp({ pages: [JsxPage], port: 8181 }).run() .catch(error => { console.error(error); process.exitCode = 1; });
Plain TSX, escaped by default, with no browser framework.