We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, could you add an example of how it works in React18?
Example of the new Remix entry.server.tsx can be found here: https://github.com/epicweb-dev/epic-stack/blob/main/app/entry.server.tsx
entry.server.tsx
Here is what I've tried but it doesn't seem to work
function handleBrowserRequest( request: Request, responseStatusCode: number, responseHeaders: Headers, remixContext: EntryContext ) { return new Promise((resolve, reject) => { let shellRendered = false; const { pipe, abort } = renderToPipeableStream( <RemixServer context={remixContext} url={request.url} abortDelay={ABORT_DELAY} />, { onShellReady() { shellRendered = true; const body = new PassThrough(); const stream = createReadableStreamFromReadable(body); responseHeaders.set("Content-Type", "text/html"); const response = new Response(stream, { headers: responseHeaders, status: responseStatusCode, }) resolve( 👉 etag({ request, response }) ); pipe(body); }, onShellError(error: unknown) { .. }, onError(error: unknown) { ... }, } ); setTimeout(abort, ABORT_DELAY); }); }
The text was updated successfully, but these errors were encountered:
@HuyAms did you have any luck figuring this out? I'm stuck in the same place 😕
Sorry, something went wrong.
@HuyAms in case you didn't figure it out, here is the solution: remix-run/remix#9174
No branches or pull requests
Hi, could you add an example of how it works in React18?
Example of the new Remix
entry.server.tsx
can be found here: https://github.com/epicweb-dev/epic-stack/blob/main/app/entry.server.tsxHere is what I've tried but it doesn't seem to work
The text was updated successfully, but these errors were encountered: