import React from 'react'; import {renderToString} from 'react-dom/server'; import type {EntryContext} from 'remix'; import {RemixServer} from 'remix'; export default function handleRequest( request: Request, responseStatusCode: number, responseHeaders: Headers, remixContext: EntryContext ) { const markup = renderToString(); responseHeaders.set('Content-Type', 'text/html'); return new Response('' + markup, { status: responseStatusCode, headers: responseHeaders, }); }