You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Fizz][Float] stop automatically preloading scripts that are not script resources (#26877)
Currently we preload all scripts that are not hoisted. One of the
original reasons for this is we stopped SSR rendering async scripts that
had an onLoad/onError because we needed to be able to distinguish
between Float scripts and non-Float scripts during hydration. Hydration
has been refactored a bit and we can not get around this limitation so
we can just emit the async script in place. However, sync and defer
scripts are also preloaded. While this is sometimes desirable it is not
universally so and there are issues with conveying priority properly
(see fetchpriority) so with this change we remove the automatic
preloading of non-Float scripts altogether.
For this change to make sense we also need to emit async scripts with
loading handlers during SSR. we previously only preloaded them during
SSR because it was necessary to keep async scripts as unambiguously
resources when hydrating. One ancillary benefit was that load handlers
would always fire b/c there was no chance the script would run before
hydration. With this change we go back to having the ability to have
load handlers fired before hydration. This is already a problem with
images and we don't have a generalized solution for it however our
likely approach to this sort of thing where you need to wait for a
script to load is to use something akin to `importScripts()` rather than
rendering a script with onLoad.
DiffTrain build for commit e1ad4aa.
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23922,7 +23922,7 @@ function createFiberRoot(
23922
23922
return root;
23923
23923
}
23924
23924
23925
-
var ReactVersion = "18.3.0-canary-5fb2c15a8-20230601";
23925
+
var ReactVersion = "18.3.0-canary-e1ad4aa36-20230601";
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -8617,7 +8617,7 @@ var devToolsConfig$jscomp$inline_1031 = {
8617
8617
throwError("TestRenderer does not support findFiberByHostInstance()");
8618
8618
},
8619
8619
bundleType: 0,
8620
-
version: "18.3.0-canary-5fb2c15a8-20230601",
8620
+
version: "18.3.0-canary-e1ad4aa36-20230601",
8621
8621
rendererPackageName: "react-test-renderer"
8622
8622
};
8623
8623
varinternals$jscomp$inline_1230={
@@ -8648,7 +8648,7 @@ var internals$jscomp$inline_1230 = {
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9043,7 +9043,7 @@ var devToolsConfig$jscomp$inline_1073 = {
9043
9043
throwError("TestRenderer does not support findFiberByHostInstance()");
9044
9044
},
9045
9045
bundleType: 0,
9046
-
version: "18.3.0-canary-5fb2c15a8-20230601",
9046
+
version: "18.3.0-canary-e1ad4aa36-20230601",
9047
9047
rendererPackageName: "react-test-renderer"
9048
9048
};
9049
9049
varinternals$jscomp$inline_1271={
@@ -9074,7 +9074,7 @@ var internals$jscomp$inline_1271 = {
0 commit comments