remix
remix copied to clipboard
chore(templates): update cloudflare templates to support streaming and `defer` in entry.server.tsx
The cloudflare-pages and cloudflare-workers templates had been updated to React 18, but do not currently support streaming responses and defer.
This PR:
- Updates those templates to do so. Now a new project initialized with either of those templates should support
deferout of the box. - Updates the docs for
deferto include steps on how to upgrade an older Remix app to supportdefer, including necessary changes inentry.client.tsxandentry.server.tsthat enable client-side React 18 hydration and streaming responses.
I pulled the entry.server.tsx code from @jacob-ebey's example project which deploys to Cloudflare and also tested it successfully on my own project.
Thanks for all your great work and very excited to begin playing around with defer.
⚠️ No Changeset found
Latest commit: 704fc042be715857e97621442605e49113a4a3cc
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
@dgurns was this closed by mistake?
Woah weird. Yeah didn't mean to close it. I think I clicked "sync fork" on Github and something happened ha! I'll look into it and reopen.
Opened a new PR #5298