Skip to content

Commit

Permalink
[Fiber] Support Suspense boundaries anywhere (excluding hydration) (f…
Browse files Browse the repository at this point in the history
…acebook#32163)

This is a follow up to facebook#32069

In the prior change I updated Fizz to allow you to render Suspense
boundaries at any level within a react-dom application by treating the
document body as the default render scope. This change updates Fiber to
provide similar semantics. Note that this update still does not deliver
hydration so unifying the Fizz and Fiber implementations in a single App
is not possible yet.

The implementation required a rework of the getHostSibling and
getHostParent algorithms. Now most HostSingletons are invisible from a
host positioning perspective. Head is special in that it is a valid host
scope so when you have Placements inside of it, it will act as the
parent. But body, and html, will not directly participate in host
positioning.

Additionally to support flipping to a fallback html, head, and body tag
in a Suspense fallback I updated the offscreen hiding/unhide logic to
pierce through singletons when lookin for matching hidable nod
boundaries anywhere (excluding hydration)

DiffTrain build for [c492f97](facebook@c492f97)
  • Loading branch information
pull[bot] committed Jan 29, 2025
1 parent 0f34683 commit 5db65a3
Show file tree
Hide file tree
Showing 23 changed files with 2,587 additions and 2,280 deletions.
2 changes: 1 addition & 1 deletion compiled-rn/VERSION_NATIVE_FB
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.1.0-native-fb-b65afdd0-20250124
19.1.0-native-fb-c492f975-20250128
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<f86a149ff967387732d4233e07747d36>>
* @generated SignedSource<<9a8e6d87de286af0f0b7f0e95ed5ba44>>
*/

"use strict";
Expand Down Expand Up @@ -428,5 +428,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-b65afdd0-20250124";
exports.version = "19.1.0-native-fb-c492f975-20250128";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<d555752c449cd18ecbdfd3e8cee0f299>>
* @generated SignedSource<<c65ead1c566f2d8325f66a03ffe94792>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-b65afdd0-20250124";
exports.version = "19.1.0-native-fb-c492f975-20250128";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<d555752c449cd18ecbdfd3e8cee0f299>>
* @generated SignedSource<<c65ead1c566f2d8325f66a03ffe94792>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-b65afdd0-20250124";
exports.version = "19.1.0-native-fb-c492f975-20250128";

Large diffs are not rendered by default.

Loading

0 comments on commit 5db65a3

Please sign in to comment.