fix: Update SuspenseList to handle hydration context and add unit tests for resolveSSRNode and createResource functions - #2531
Merged
Conversation
🦋 Changeset detectedLatest commit: 5f6310d The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Member
|
Thanks.. I haven't really tried SuspenseList in SSR projects for ages so yeah it's quite likely we're off by an ID. Yeah reviewing looks that way as SuspenseList calls |
Pull Request Test Coverage Report for Build 16908319277Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
2 tasks
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.
Summary
Objective: To make
SuspenseListusable in SSR and add some simple tests.Currently,
SuspenseListis a fairly reliable implementation of the component in CSR, but it doesn't work well in SSR.This modification aims to improve the reliability of
SuspenseListby aligning the hydration key with the client-side.How did you test this change?
In addition to the issue with
SuspenseListand direct DOM elements injected, it also fails to follow the specification in CSR.For example, it currently fails to drive in the following situations:
SuspenseListand direct DOM elements injected - [Bug?]: SuspenseList hydration error #2124This commit is an incomplete solution because it fails to express
revealOrder. However, the existing component does not perform deferred initial loading at all, sorevealOrderitself is never expressed.So I'm requesting a pull because I don't think this commit breaks existing functionality, and I think it should be prioritized in terms of making the component more stable to run.