Repository navigation
docs: clarify that resumeAndPrerender prelude stream is partial when postponed - #8768
Open
pawannyadav05 wants to merge 1 commit into
Open
pawannyadav05 wants to merge 1 commit into
pawannyadav05 wants to merge 1 commit into
Conversation
…postponed Clarifies in the resumeAndPrerender reference documentation that the returned prelude stream is not necessarily a standalone, complete HTML document if rendering was postponed or aborted, preventing confusion where developers attempt to send the prelude directly as the entire HTTP response body. Fixes reactjs#8755
Size changesDetails📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Is there any way to use |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #8755
Summary
Clarifies in the
resumeAndPrerenderreference documentation that the returnedpreludeWeb Stream is not necessarily a standalone, complete HTML document if rendering was postponed or aborted.Problem
The documentation for
resumeAndPrerenderpreviously stated:And showed a code snippet returning
new Response(prelude)directly.This caused confusion for developers (as noted in #8755) who expected the
preludestream to always yield a fully formed HTML document. In reality, with partial pre-rendering (PPR), if components postpone or abort during prerendering, thepreludeonly contains the static shell and resolved segments. Developers who returnpreludedirectly as the response body without combining it with a resumed stream end up serving an incomplete document.Solution
preludeinresumeAndPrerender.mdto explicitly state that the stream contains the rendered shell and resolved segments, and is not necessarily a complete HTML document if postponed or aborted.Changes
src/content/reference/react-dom/static/resumeAndPrerender.md: Updated thepreludereturn value description.