Skip to content

Commit b9b97d9

Browse files
committed
[Flight/Fizz] Reset ThenableState Only in Branches Where It's Added (#28068)
Before, we used to reset the thenable state and extract the previous state very early so that it's only the retried task that can possibly consume it. This is nice because we can't accidentally consume that state for any other node. However, it does add a lot of branches of code that has to pass this around. It also adds extra bytes on the stack per node. Even though it's mostly just null. This changes it so that where ever we can create a thenable state (e.g. entering a component with hooks) we first extract this from the task. The principle is that whatever could've created the thenable state in the first place, must always be rerendered so it'll take the same code paths to get there and so we'll always consume it. DiffTrain build for [382190c](382190c)
1 parent 68cd468 commit b9b97d9

13 files changed

+739
-1315
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b123b9c4f054a7def7ed84e350ccd46cc86672a6
1+
382190c595126837ee7e43b4fa953f4edd30e01c

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if (__DEV__) {
2424
) {
2525
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
2626
}
27-
var ReactVersion = "18.3.0-www-modern-60875b50";
27+
var ReactVersion = "18.3.0-www-modern-c131adbc";
2828

2929
// ATTENTION
3030
// When adding new symbols to this file,

0 commit comments

Comments
 (0)