Skip to content

Commit

Permalink
chore: add abortDelay prop to <RemixServer>
Browse files Browse the repository at this point in the history
Signed-off-by: Logan McAnsh <[email protected]>
  • Loading branch information
mcansh committed Jan 17, 2023
1 parent 56fa937 commit 967a649
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ export default function handleRequest(
let didError = false;

let { pipe, abort } = renderToPipeableStream(
<RemixServer context={remixContext} url={request.url} />,
<RemixServer
context={remixContext}
url={request.url}
abortDelay={ABORT_DELAY}
/>,
{
onShellReady: () => {
let body = new PassThrough();
Expand Down
6 changes: 5 additions & 1 deletion packages/remix-dev/config/defaults/entry.server.node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ export default function handleRequest(
let didError = false;

const { pipe, abort } = renderToPipeableStream(
<RemixServer context={remixContext} url={request.url} />,
<RemixServer
context={remixContext}
url={request.url}
abortDelay={ABORT_DELAY}
/>,
{
onAllReady() {
const body = new PassThrough();
Expand Down
6 changes: 5 additions & 1 deletion scripts/playground/template/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ export default function handleRequest(
let didError = false;

let { pipe, abort } = renderToPipeableStream(
<RemixServer context={remixContext} url={request.url} />,
<RemixServer
context={remixContext}
url={request.url}
abortDelay={ABORT_DELAY}
/>,
{
[callbackName]: () => {
let body = new PassThrough();
Expand Down
12 changes: 10 additions & 2 deletions templates/express/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ function handleBotRequest(
let didError = false;

const { pipe, abort } = renderToPipeableStream(
<RemixServer context={remixContext} url={request.url} />,
<RemixServer
context={remixContext}
url={request.url}
abortDelay={ABORT_DELAY}
/>,
{
onAllReady() {
const body = new PassThrough();
Expand Down Expand Up @@ -79,7 +83,11 @@ function handleBrowserRequest(
let didError = false;

const { pipe, abort } = renderToPipeableStream(
<RemixServer context={remixContext} url={request.url} />,
<RemixServer
context={remixContext}
url={request.url}
abortDelay={ABORT_DELAY}
/>,
{
onShellReady() {
const body = new PassThrough();
Expand Down
12 changes: 10 additions & 2 deletions templates/fly/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ function handleBotRequest(
let didError = false;

const { pipe, abort } = renderToPipeableStream(
<RemixServer context={remixContext} url={request.url} />,
<RemixServer
context={remixContext}
url={request.url}
abortDelay={ABORT_DELAY}
/>,
{
onAllReady() {
const body = new PassThrough();
Expand Down Expand Up @@ -79,7 +83,11 @@ function handleBrowserRequest(
let didError = false;

const { pipe, abort } = renderToPipeableStream(
<RemixServer context={remixContext} url={request.url} />,
<RemixServer
context={remixContext}
url={request.url}
abortDelay={ABORT_DELAY}
/>,
{
onShellReady() {
const body = new PassThrough();
Expand Down
12 changes: 10 additions & 2 deletions templates/remix/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ function handleBotRequest(
let didError = false;

const { pipe, abort } = renderToPipeableStream(
<RemixServer context={remixContext} url={request.url} />,
<RemixServer
context={remixContext}
url={request.url}
abortDelay={ABORT_DELAY}
/>,
{
onAllReady() {
const body = new PassThrough();
Expand Down Expand Up @@ -79,7 +83,11 @@ function handleBrowserRequest(
let didError = false;

const { pipe, abort } = renderToPipeableStream(
<RemixServer context={remixContext} url={request.url} />,
<RemixServer
context={remixContext}
url={request.url}
abortDelay={ABORT_DELAY}
/>,
{
onShellReady() {
const body = new PassThrough();
Expand Down

0 comments on commit 967a649

Please sign in to comment.