chore(templates): update cloudflare templates to support streaming and defer
in entry.server.tsx
#5298
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
cloudflare-pages
andcloudflare-workers
templates had been updated to React 18, but do not currently support streaming responses anddefer
.This PR:
defer
out of the box.defer
to include steps on how to upgrade an older Remix app to supportdefer
, including necessary changes inentry.client.tsx
andentry.server.ts
that enable client-side React 18 hydration and streaming responses.cloudflare-pages
/cloudflare-workers
local dev servers on port 3000 to match the defaultremix
server behaviorI pulled the
entry.server.tsx
code from @jacob-ebey's example project which deploys to Cloudflare and tested that the updatedcloudflare-pages
/cloudflare-workers
templates run successfully for local dev, including withdefer
.Thanks for all your great work and very excited to begin playing around with
defer
.