mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Add alwaysThrottleRetries flag (#26685)
This puts the change introduced by #26611 behind a flag until Meta is able to roll it out. Disabling the flag reverts back to the old behavior, where retries are throttled if there's still data remaining in the tree, but not if all the data has finished loading. The new behavior is still enabled in the public builds. DiffTrain build for commit https://github.com/facebook/react/commit/d73d7d59086218b0fa42d0a79c32a0365952650b.
This commit is contained in:
+5
-4
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<fb35677e465a0575f9b39e24b8b35767>>
|
||||
* @generated SignedSource<<43355784ad4a055ab0a02e5c5e648c88>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -145,7 +145,8 @@ var createRootStrictEffectsByDefault = false;
|
||||
var enableLazyContextPropagation = false;
|
||||
var enableLegacyHidden = false;
|
||||
var diffInCommitPhase = true;
|
||||
var enableAsyncActions = false; // Flow magic to verify the exports of this file match the original version.
|
||||
var enableAsyncActions = false;
|
||||
var alwaysThrottleRetries = true; // Flow magic to verify the exports of this file match the original version.
|
||||
|
||||
var FunctionComponent = 0;
|
||||
var ClassComponent = 1;
|
||||
@@ -20431,7 +20432,7 @@ function finishConcurrentRender(root, exitStatus, finishedWork, lanes) {
|
||||
workInProgressTransitions
|
||||
);
|
||||
} else {
|
||||
if (includesOnlyRetries(lanes)) {
|
||||
if (includesOnlyRetries(lanes) && alwaysThrottleRetries) {
|
||||
// This render only included retries, no updates. Throttle committing
|
||||
// retries so that we don't show too many loading states too quickly.
|
||||
var msUntilTimeout =
|
||||
@@ -23858,7 +23859,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-next-7f8c501f6-20230420";
|
||||
var ReactVersion = "18.3.0-next-d73d7d590-20230420";
|
||||
|
||||
// Might add PROFILE later.
|
||||
|
||||
|
||||
+2
-2
@@ -8599,7 +8599,7 @@ var devToolsConfig$jscomp$inline_1021 = {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-next-7f8c501f6-20230420",
|
||||
version: "18.3.0-next-d73d7d590-20230420",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
var internals$jscomp$inline_1206 = {
|
||||
@@ -8630,7 +8630,7 @@ var internals$jscomp$inline_1206 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-7f8c501f6-20230420"
|
||||
reconcilerVersion: "18.3.0-next-d73d7d590-20230420"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1207 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+2
-2
@@ -9025,7 +9025,7 @@ var devToolsConfig$jscomp$inline_1063 = {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-next-7f8c501f6-20230420",
|
||||
version: "18.3.0-next-d73d7d590-20230420",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
var internals$jscomp$inline_1247 = {
|
||||
@@ -9056,7 +9056,7 @@ var internals$jscomp$inline_1247 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-7f8c501f6-20230420"
|
||||
reconcilerVersion: "18.3.0-next-d73d7d590-20230420"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1248 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ if (
|
||||
}
|
||||
"use strict";
|
||||
|
||||
var ReactVersion = "18.3.0-next-7f8c501f6-20230420";
|
||||
var ReactVersion = "18.3.0-next-d73d7d590-20230420";
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
|
||||
+1
-1
@@ -639,4 +639,4 @@ exports.useSyncExternalStore = function (
|
||||
);
|
||||
};
|
||||
exports.useTransition = useTransition;
|
||||
exports.version = "18.3.0-next-7f8c501f6-20230420";
|
||||
exports.version = "18.3.0-next-d73d7d590-20230420";
|
||||
|
||||
+1
-1
@@ -642,7 +642,7 @@ exports.useSyncExternalStore = function (
|
||||
);
|
||||
};
|
||||
exports.useTransition = useTransition;
|
||||
exports.version = "18.3.0-next-7f8c501f6-20230420";
|
||||
exports.version = "18.3.0-next-d73d7d590-20230420";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
7f8c501f682bd4abe24826a93538059d717ba39e
|
||||
d73d7d59086218b0fa42d0a79c32a0365952650b
|
||||
|
||||
+8
-4
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<13be0ed73b0dd62cc37d1e24af8fe51a>>
|
||||
* @generated SignedSource<<78a825a4d424f226b6f344ef3a16b2ec>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -3198,7 +3198,8 @@ function dispatchEvent(target, topLevelType, nativeEvent) {
|
||||
|
||||
var enableUseRefAccessWarning = dynamicFlags.enableUseRefAccessWarning,
|
||||
enableDeferRootSchedulingToMicrotask =
|
||||
dynamicFlags.enableDeferRootSchedulingToMicrotask; // The rest of the flags are static for better dead code elimination.
|
||||
dynamicFlags.enableDeferRootSchedulingToMicrotask,
|
||||
alwaysThrottleRetries = dynamicFlags.alwaysThrottleRetries; // The rest of the flags are static for better dead code elimination.
|
||||
var enableSchedulingProfiler = true;
|
||||
var enableProfilerTimer = true;
|
||||
var enableProfilerCommitHooks = true;
|
||||
@@ -23536,7 +23537,10 @@ function finishConcurrentRender(root, exitStatus, finishedWork, lanes) {
|
||||
workInProgressTransitions
|
||||
);
|
||||
} else {
|
||||
if (includesOnlyRetries(lanes)) {
|
||||
if (
|
||||
includesOnlyRetries(lanes) &&
|
||||
(alwaysThrottleRetries || exitStatus === RootSuspended)
|
||||
) {
|
||||
// This render only included retries, no updates. Throttle committing
|
||||
// retries so that we don't show too many loading states too quickly.
|
||||
var msUntilTimeout =
|
||||
@@ -27165,7 +27169,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-next-7f8c501f6-20230420";
|
||||
var ReactVersion = "18.3.0-next-d73d7d590-20230420";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
+30
-28
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<0b0bda830df48380bcde0d6ac5c73756>>
|
||||
* @generated SignedSource<<472cb7f28d742af2e290a0816a880f33>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -1317,6 +1317,7 @@ function dispatchEvent(target, topLevelType, nativeEvent) {
|
||||
var enableUseRefAccessWarning = dynamicFlags.enableUseRefAccessWarning,
|
||||
enableDeferRootSchedulingToMicrotask =
|
||||
dynamicFlags.enableDeferRootSchedulingToMicrotask,
|
||||
alwaysThrottleRetries = dynamicFlags.alwaysThrottleRetries,
|
||||
scheduleCallback$2 = Scheduler.unstable_scheduleCallback,
|
||||
cancelCallback$1 = Scheduler.unstable_cancelCallback,
|
||||
shouldYield = Scheduler.unstable_shouldYield,
|
||||
@@ -7567,28 +7568,28 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root === workInProgressRoot ? workInProgressRootRenderLanes : 0
|
||||
);
|
||||
if (0 === lanes) return null;
|
||||
didTimeout =
|
||||
var exitStatus =
|
||||
includesBlockingLane(root, lanes) ||
|
||||
0 !== (lanes & root.expiredLanes) ||
|
||||
didTimeout
|
||||
? renderRootSync(root, lanes)
|
||||
: renderRootConcurrent(root, lanes);
|
||||
if (0 !== didTimeout) {
|
||||
if (2 === didTimeout) {
|
||||
var originallyAttemptedLanes = lanes,
|
||||
errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
originallyAttemptedLanes
|
||||
);
|
||||
if (0 !== exitStatus) {
|
||||
if (2 === exitStatus) {
|
||||
didTimeout = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
didTimeout
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(didTimeout = recoverFromConcurrentError(
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
didTimeout,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === didTimeout)
|
||||
if (1 === exitStatus)
|
||||
throw (
|
||||
((originalCallbackNode = workInProgressRootFatalError),
|
||||
prepareFreshStack(root, 0),
|
||||
@@ -7596,16 +7597,16 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
if (6 === didTimeout) markRootSuspended(root, lanes);
|
||||
if (6 === exitStatus) markRootSuspended(root, lanes);
|
||||
else {
|
||||
errorRetryLanes = !includesBlockingLane(root, lanes);
|
||||
originallyAttemptedLanes = root.current.alternate;
|
||||
didTimeout = root.current.alternate;
|
||||
if (
|
||||
errorRetryLanes &&
|
||||
!isRenderConsistentWithExternalStores(originallyAttemptedLanes)
|
||||
!isRenderConsistentWithExternalStores(didTimeout)
|
||||
) {
|
||||
didTimeout = renderRootSync(root, lanes);
|
||||
if (2 === didTimeout) {
|
||||
exitStatus = renderRootSync(root, lanes);
|
||||
if (2 === exitStatus) {
|
||||
errorRetryLanes = lanes;
|
||||
var errorRetryLanes$96 = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
@@ -7613,13 +7614,13 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
);
|
||||
0 !== errorRetryLanes$96 &&
|
||||
((lanes = errorRetryLanes$96),
|
||||
(didTimeout = recoverFromConcurrentError(
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
errorRetryLanes,
|
||||
errorRetryLanes$96
|
||||
)));
|
||||
}
|
||||
if (1 === didTimeout)
|
||||
if (1 === exitStatus)
|
||||
throw (
|
||||
((originalCallbackNode = workInProgressRootFatalError),
|
||||
prepareFreshStack(root, 0),
|
||||
@@ -7628,10 +7629,10 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
originalCallbackNode)
|
||||
);
|
||||
}
|
||||
root.finishedWork = originallyAttemptedLanes;
|
||||
root.finishedWork = didTimeout;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
switch (didTimeout) {
|
||||
switch (exitStatus) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
@@ -7650,8 +7651,9 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
((didTimeout = globalMostRecentFallbackTime + 500 - now()),
|
||||
10 < didTimeout)
|
||||
(alwaysThrottleRetries || 3 === exitStatus) &&
|
||||
((exitStatus = globalMostRecentFallbackTime + 500 - now()),
|
||||
10 < exitStatus)
|
||||
) {
|
||||
markRootSuspended(root, lanes);
|
||||
if (0 !== getNextLanes(root, 0)) break a;
|
||||
@@ -7659,18 +7661,18 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
didTimeout
|
||||
exitStatus
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
@@ -9468,7 +9470,7 @@ var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1045 = {
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-next-7f8c501f6-20230420",
|
||||
version: "18.3.0-next-d73d7d590-20230420",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForViewTag: function () {
|
||||
@@ -9510,7 +9512,7 @@ var internals$jscomp$inline_1276 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-7f8c501f6-20230420"
|
||||
reconcilerVersion: "18.3.0-next-d73d7d590-20230420"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1277 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+30
-28
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<62e5871fa2a1f61ba1d7d0e5e2ccb1ca>>
|
||||
* @generated SignedSource<<eb589f3defe98e20e791e57446c3f979>>
|
||||
*/
|
||||
|
||||
|
||||
@@ -1328,6 +1328,7 @@ function dispatchEvent(target, topLevelType, nativeEvent) {
|
||||
var enableUseRefAccessWarning = dynamicFlags.enableUseRefAccessWarning,
|
||||
enableDeferRootSchedulingToMicrotask =
|
||||
dynamicFlags.enableDeferRootSchedulingToMicrotask,
|
||||
alwaysThrottleRetries = dynamicFlags.alwaysThrottleRetries,
|
||||
scheduleCallback$2 = Scheduler.unstable_scheduleCallback,
|
||||
cancelCallback$1 = Scheduler.unstable_cancelCallback,
|
||||
shouldYield = Scheduler.unstable_shouldYield,
|
||||
@@ -8098,28 +8099,28 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root === workInProgressRoot ? workInProgressRootRenderLanes : 0
|
||||
);
|
||||
if (0 === lanes) return null;
|
||||
didTimeout =
|
||||
var exitStatus =
|
||||
includesBlockingLane(root, lanes) ||
|
||||
0 !== (lanes & root.expiredLanes) ||
|
||||
didTimeout
|
||||
? renderRootSync(root, lanes)
|
||||
: renderRootConcurrent(root, lanes);
|
||||
if (0 !== didTimeout) {
|
||||
if (2 === didTimeout) {
|
||||
var originallyAttemptedLanes = lanes,
|
||||
errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
originallyAttemptedLanes
|
||||
);
|
||||
if (0 !== exitStatus) {
|
||||
if (2 === exitStatus) {
|
||||
didTimeout = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
didTimeout
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(didTimeout = recoverFromConcurrentError(
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
didTimeout,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === didTimeout)
|
||||
if (1 === exitStatus)
|
||||
throw (
|
||||
((originalCallbackNode = workInProgressRootFatalError),
|
||||
prepareFreshStack(root, 0),
|
||||
@@ -8127,16 +8128,16 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
if (6 === didTimeout) markRootSuspended(root, lanes);
|
||||
if (6 === exitStatus) markRootSuspended(root, lanes);
|
||||
else {
|
||||
errorRetryLanes = !includesBlockingLane(root, lanes);
|
||||
originallyAttemptedLanes = root.current.alternate;
|
||||
didTimeout = root.current.alternate;
|
||||
if (
|
||||
errorRetryLanes &&
|
||||
!isRenderConsistentWithExternalStores(originallyAttemptedLanes)
|
||||
!isRenderConsistentWithExternalStores(didTimeout)
|
||||
) {
|
||||
didTimeout = renderRootSync(root, lanes);
|
||||
if (2 === didTimeout) {
|
||||
exitStatus = renderRootSync(root, lanes);
|
||||
if (2 === exitStatus) {
|
||||
errorRetryLanes = lanes;
|
||||
var errorRetryLanes$112 = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
@@ -8144,13 +8145,13 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
);
|
||||
0 !== errorRetryLanes$112 &&
|
||||
((lanes = errorRetryLanes$112),
|
||||
(didTimeout = recoverFromConcurrentError(
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
errorRetryLanes,
|
||||
errorRetryLanes$112
|
||||
)));
|
||||
}
|
||||
if (1 === didTimeout)
|
||||
if (1 === exitStatus)
|
||||
throw (
|
||||
((originalCallbackNode = workInProgressRootFatalError),
|
||||
prepareFreshStack(root, 0),
|
||||
@@ -8159,10 +8160,10 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
originalCallbackNode)
|
||||
);
|
||||
}
|
||||
root.finishedWork = originallyAttemptedLanes;
|
||||
root.finishedWork = didTimeout;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
switch (didTimeout) {
|
||||
switch (exitStatus) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
@@ -8181,8 +8182,9 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
((didTimeout = globalMostRecentFallbackTime + 500 - now$1()),
|
||||
10 < didTimeout)
|
||||
(alwaysThrottleRetries || 3 === exitStatus) &&
|
||||
((exitStatus = globalMostRecentFallbackTime + 500 - now$1()),
|
||||
10 < exitStatus)
|
||||
) {
|
||||
markRootSuspended(root, lanes);
|
||||
if (0 !== getNextLanes(root, 0)) break a;
|
||||
@@ -8190,18 +8192,18 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
didTimeout
|
||||
exitStatus
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
@@ -10177,7 +10179,7 @@ var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1123 = {
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-next-7f8c501f6-20230420",
|
||||
version: "18.3.0-next-d73d7d590-20230420",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForViewTag: function () {
|
||||
@@ -10232,7 +10234,7 @@ var roots = new Map(),
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-7f8c501f6-20230420"
|
||||
reconcilerVersion: "18.3.0-next-d73d7d590-20230420"
|
||||
});
|
||||
exports.createPortal = function (children, containerTag) {
|
||||
return createPortal$1(
|
||||
|
||||
+8
-4
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<de572b61915ca2d3507aad4b1b3a285e>>
|
||||
* @generated SignedSource<<c436afb62033d99c29aa548e109fdbde>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -2917,7 +2917,8 @@ function set(key, value) {
|
||||
|
||||
var enableUseRefAccessWarning = dynamicFlags.enableUseRefAccessWarning,
|
||||
enableDeferRootSchedulingToMicrotask =
|
||||
dynamicFlags.enableDeferRootSchedulingToMicrotask; // The rest of the flags are static for better dead code elimination.
|
||||
dynamicFlags.enableDeferRootSchedulingToMicrotask,
|
||||
alwaysThrottleRetries = dynamicFlags.alwaysThrottleRetries; // The rest of the flags are static for better dead code elimination.
|
||||
var enableSchedulingProfiler = true;
|
||||
var enableProfilerTimer = true;
|
||||
var enableProfilerCommitHooks = true;
|
||||
@@ -24049,7 +24050,10 @@ function finishConcurrentRender(root, exitStatus, finishedWork, lanes) {
|
||||
workInProgressTransitions
|
||||
);
|
||||
} else {
|
||||
if (includesOnlyRetries(lanes)) {
|
||||
if (
|
||||
includesOnlyRetries(lanes) &&
|
||||
(alwaysThrottleRetries || exitStatus === RootSuspended)
|
||||
) {
|
||||
// This render only included retries, no updates. Throttle committing
|
||||
// retries so that we don't show too many loading states too quickly.
|
||||
var msUntilTimeout =
|
||||
@@ -27678,7 +27682,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-next-7f8c501f6-20230420";
|
||||
var ReactVersion = "18.3.0-next-d73d7d590-20230420";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
+30
-28
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<83f90ff98709415fa3ab035afd4a2821>>
|
||||
* @generated SignedSource<<54d01cff9e9c78ffba08f73a6631a077>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -1162,6 +1162,7 @@ var ReactSharedInternals =
|
||||
enableUseRefAccessWarning = dynamicFlags.enableUseRefAccessWarning,
|
||||
enableDeferRootSchedulingToMicrotask =
|
||||
dynamicFlags.enableDeferRootSchedulingToMicrotask,
|
||||
alwaysThrottleRetries = dynamicFlags.alwaysThrottleRetries,
|
||||
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
||||
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
||||
@@ -7819,28 +7820,28 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root === workInProgressRoot ? workInProgressRootRenderLanes : 0
|
||||
);
|
||||
if (0 === lanes) return null;
|
||||
didTimeout =
|
||||
var exitStatus =
|
||||
includesBlockingLane(root, lanes) ||
|
||||
0 !== (lanes & root.expiredLanes) ||
|
||||
didTimeout
|
||||
? renderRootSync(root, lanes)
|
||||
: renderRootConcurrent(root, lanes);
|
||||
if (0 !== didTimeout) {
|
||||
if (2 === didTimeout) {
|
||||
var originallyAttemptedLanes = lanes,
|
||||
errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
originallyAttemptedLanes
|
||||
);
|
||||
if (0 !== exitStatus) {
|
||||
if (2 === exitStatus) {
|
||||
didTimeout = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
didTimeout
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(didTimeout = recoverFromConcurrentError(
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
didTimeout,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === didTimeout)
|
||||
if (1 === exitStatus)
|
||||
throw (
|
||||
((originalCallbackNode = workInProgressRootFatalError),
|
||||
prepareFreshStack(root, 0),
|
||||
@@ -7848,16 +7849,16 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
if (6 === didTimeout) markRootSuspended(root, lanes);
|
||||
if (6 === exitStatus) markRootSuspended(root, lanes);
|
||||
else {
|
||||
errorRetryLanes = !includesBlockingLane(root, lanes);
|
||||
originallyAttemptedLanes = root.current.alternate;
|
||||
didTimeout = root.current.alternate;
|
||||
if (
|
||||
errorRetryLanes &&
|
||||
!isRenderConsistentWithExternalStores(originallyAttemptedLanes)
|
||||
!isRenderConsistentWithExternalStores(didTimeout)
|
||||
) {
|
||||
didTimeout = renderRootSync(root, lanes);
|
||||
if (2 === didTimeout) {
|
||||
exitStatus = renderRootSync(root, lanes);
|
||||
if (2 === exitStatus) {
|
||||
errorRetryLanes = lanes;
|
||||
var errorRetryLanes$102 = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
@@ -7865,13 +7866,13 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
);
|
||||
0 !== errorRetryLanes$102 &&
|
||||
((lanes = errorRetryLanes$102),
|
||||
(didTimeout = recoverFromConcurrentError(
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
errorRetryLanes,
|
||||
errorRetryLanes$102
|
||||
)));
|
||||
}
|
||||
if (1 === didTimeout)
|
||||
if (1 === exitStatus)
|
||||
throw (
|
||||
((originalCallbackNode = workInProgressRootFatalError),
|
||||
prepareFreshStack(root, 0),
|
||||
@@ -7880,10 +7881,10 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
originalCallbackNode)
|
||||
);
|
||||
}
|
||||
root.finishedWork = originallyAttemptedLanes;
|
||||
root.finishedWork = didTimeout;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
switch (didTimeout) {
|
||||
switch (exitStatus) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
@@ -7902,8 +7903,9 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
((didTimeout = globalMostRecentFallbackTime + 500 - now()),
|
||||
10 < didTimeout)
|
||||
(alwaysThrottleRetries || 3 === exitStatus) &&
|
||||
((exitStatus = globalMostRecentFallbackTime + 500 - now()),
|
||||
10 < exitStatus)
|
||||
) {
|
||||
markRootSuspended(root, lanes);
|
||||
if (0 !== getNextLanes(root, 0)) break a;
|
||||
@@ -7911,18 +7913,18 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
didTimeout
|
||||
exitStatus
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
@@ -9727,7 +9729,7 @@ var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1100 = {
|
||||
findFiberByHostInstance: getInstanceFromTag,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-next-7f8c501f6-20230420",
|
||||
version: "18.3.0-next-d73d7d590-20230420",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForViewTag: function () {
|
||||
@@ -9769,7 +9771,7 @@ var internals$jscomp$inline_1345 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-7f8c501f6-20230420"
|
||||
reconcilerVersion: "18.3.0-next-d73d7d590-20230420"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1346 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+30
-28
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<3b13a421b8eb84471cd505d2ab17ec9b>>
|
||||
* @generated SignedSource<<1ac72a305be24eff51144b88fe9c565d>>
|
||||
*/
|
||||
|
||||
|
||||
@@ -1173,6 +1173,7 @@ var ReactSharedInternals =
|
||||
enableUseRefAccessWarning = dynamicFlags.enableUseRefAccessWarning,
|
||||
enableDeferRootSchedulingToMicrotask =
|
||||
dynamicFlags.enableDeferRootSchedulingToMicrotask,
|
||||
alwaysThrottleRetries = dynamicFlags.alwaysThrottleRetries,
|
||||
REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
||||
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
||||
@@ -8350,28 +8351,28 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
root === workInProgressRoot ? workInProgressRootRenderLanes : 0
|
||||
);
|
||||
if (0 === lanes) return null;
|
||||
didTimeout =
|
||||
var exitStatus =
|
||||
includesBlockingLane(root, lanes) ||
|
||||
0 !== (lanes & root.expiredLanes) ||
|
||||
didTimeout
|
||||
? renderRootSync(root, lanes)
|
||||
: renderRootConcurrent(root, lanes);
|
||||
if (0 !== didTimeout) {
|
||||
if (2 === didTimeout) {
|
||||
var originallyAttemptedLanes = lanes,
|
||||
errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
originallyAttemptedLanes
|
||||
);
|
||||
if (0 !== exitStatus) {
|
||||
if (2 === exitStatus) {
|
||||
didTimeout = lanes;
|
||||
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
didTimeout
|
||||
);
|
||||
0 !== errorRetryLanes &&
|
||||
((lanes = errorRetryLanes),
|
||||
(didTimeout = recoverFromConcurrentError(
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
didTimeout,
|
||||
errorRetryLanes
|
||||
)));
|
||||
}
|
||||
if (1 === didTimeout)
|
||||
if (1 === exitStatus)
|
||||
throw (
|
||||
((originalCallbackNode = workInProgressRootFatalError),
|
||||
prepareFreshStack(root, 0),
|
||||
@@ -8379,16 +8380,16 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
ensureRootIsScheduled(root),
|
||||
originalCallbackNode)
|
||||
);
|
||||
if (6 === didTimeout) markRootSuspended(root, lanes);
|
||||
if (6 === exitStatus) markRootSuspended(root, lanes);
|
||||
else {
|
||||
errorRetryLanes = !includesBlockingLane(root, lanes);
|
||||
originallyAttemptedLanes = root.current.alternate;
|
||||
didTimeout = root.current.alternate;
|
||||
if (
|
||||
errorRetryLanes &&
|
||||
!isRenderConsistentWithExternalStores(originallyAttemptedLanes)
|
||||
!isRenderConsistentWithExternalStores(didTimeout)
|
||||
) {
|
||||
didTimeout = renderRootSync(root, lanes);
|
||||
if (2 === didTimeout) {
|
||||
exitStatus = renderRootSync(root, lanes);
|
||||
if (2 === exitStatus) {
|
||||
errorRetryLanes = lanes;
|
||||
var errorRetryLanes$118 = getLanesToRetrySynchronouslyOnError(
|
||||
root,
|
||||
@@ -8396,13 +8397,13 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
);
|
||||
0 !== errorRetryLanes$118 &&
|
||||
((lanes = errorRetryLanes$118),
|
||||
(didTimeout = recoverFromConcurrentError(
|
||||
(exitStatus = recoverFromConcurrentError(
|
||||
root,
|
||||
errorRetryLanes,
|
||||
errorRetryLanes$118
|
||||
)));
|
||||
}
|
||||
if (1 === didTimeout)
|
||||
if (1 === exitStatus)
|
||||
throw (
|
||||
((originalCallbackNode = workInProgressRootFatalError),
|
||||
prepareFreshStack(root, 0),
|
||||
@@ -8411,10 +8412,10 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
originalCallbackNode)
|
||||
);
|
||||
}
|
||||
root.finishedWork = originallyAttemptedLanes;
|
||||
root.finishedWork = didTimeout;
|
||||
root.finishedLanes = lanes;
|
||||
a: {
|
||||
switch (didTimeout) {
|
||||
switch (exitStatus) {
|
||||
case 0:
|
||||
case 1:
|
||||
throw Error("Root did not complete. This is a bug in React.");
|
||||
@@ -8433,8 +8434,9 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
}
|
||||
if (
|
||||
(lanes & 125829120) === lanes &&
|
||||
((didTimeout = globalMostRecentFallbackTime + 500 - now$1()),
|
||||
10 < didTimeout)
|
||||
(alwaysThrottleRetries || 3 === exitStatus) &&
|
||||
((exitStatus = globalMostRecentFallbackTime + 500 - now$1()),
|
||||
10 < exitStatus)
|
||||
) {
|
||||
markRootSuspended(root, lanes);
|
||||
if (0 !== getNextLanes(root, 0)) break a;
|
||||
@@ -8442,18 +8444,18 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
|
||||
commitRootWhenReady.bind(
|
||||
null,
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
),
|
||||
didTimeout
|
||||
exitStatus
|
||||
);
|
||||
break a;
|
||||
}
|
||||
commitRootWhenReady(
|
||||
root,
|
||||
originallyAttemptedLanes,
|
||||
didTimeout,
|
||||
workInProgressRootRecoverableErrors,
|
||||
workInProgressTransitions,
|
||||
lanes
|
||||
@@ -10436,7 +10438,7 @@ var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1178 = {
|
||||
findFiberByHostInstance: getInstanceFromTag,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-next-7f8c501f6-20230420",
|
||||
version: "18.3.0-next-d73d7d590-20230420",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForViewTag: function () {
|
||||
@@ -10491,7 +10493,7 @@ var roots = new Map(),
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-7f8c501f6-20230420"
|
||||
reconcilerVersion: "18.3.0-next-d73d7d590-20230420"
|
||||
});
|
||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
|
||||
computeComponentStackForErrorReporting: function (reactTag) {
|
||||
|
||||
Reference in New Issue
Block a user