-
Notifications
You must be signed in to change notification settings - Fork 46.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fizz] Fix root segment IDs (#27371)
Typically we assign IDs lazily when flushing to minimize the ids we have to assign and we try to maximize inlining. When we prerender we could always flush into a buffer before returning but that's not actually what we do right now. We complete rendering before returning but we don't actually run the flush path until someone reads the resulting stream. We assign IDs eagerly when something postpone so that we can refer to those ids in the holes without flushing first. This leads to some interesting conditions that needs to consider this. This PR also deals with rootSegmentId which is the ID of the segment that contains the body of a Suspense boundary. The boundary needs to know this in addition to the Suspense Boundary's ID to know how to inject the root segment into the boundary. Why is the suspense boundary ID and the rootSegmentID just not the same ID? Why don't segments and suspense boundary not share ID namespace? That's a good question and I don't really remember. It might not be a good reason and maybe they should just be the same. DiffTrain build for commit a6e4791.
- Loading branch information
1 parent
320e7a7
commit bb93490
Showing
7 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
95c9554bc72813b0ee2b028774bb7cf0482887ba | ||
a6e4791b11816374d015eb4531a82e6cf209c7f2 |