Mono JSX
Server-side JSX rendering in Nitro with mono-jsx.
├── nitro.config.ts
├── package.json
├── README.md
├── server.tsx
├── tsconfig.json
└── vite.config.ts
Server Entry
server.tsx
export default () => (
<html>
<h1>Nitro + mongo-jsx works!</h1>
</html>
);
Nitro auto-detects server.tsx and uses mono-jsx to transform JSX into HTML. Export a function that returns JSX, and Nitro sends the rendered HTML as the response.