import 'server-only'; import { readFile } from 'node:fs/promises'; import { join } from 'node:path'; import { marked } from 'marked'; import sanitizeHtml from 'sanitize-html'; import Expandable from './Expandable'; const basePath = '/web/react/demos/server-components'; export default async function Page() { const markdown = await readFile( join(process.cwd(), 'content/preview.md'), 'utf8', ); const html = sanitizeHtml(marked.parse(markdown)); return (

React ยท Build-time Server Components

Prepared before your visit

This preview was read from a Markdown file during the build. The button below changes local state in your browser.

); }