Skip to content

Commit

Permalink
[Devtools] Ensure initial read of useFormStatus returns `NotPending…
Browse files Browse the repository at this point in the history
…Transition` (#28728)

DiffTrain build for [88ee14f](88ee14f)
  • Loading branch information
eps1lon committed Aug 1, 2024
1 parent c8a8095 commit 76d8d06
Show file tree
Hide file tree
Showing 34 changed files with 270 additions and 318 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a7d1240c962d2fdeac3ba31f1fdc12b5be4bbd2e
88ee14ffa57beb0689f26f0c52c357e3ac446af8
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION_TRANSFORMS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a7d1240c962d2fdeac3ba31f1fdc12b5be4bbd2e
88ee14ffa57beb0689f26f0c52c357e3ac446af8
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-classic-a7d1240c-20240731";
exports.version = "19.0.0-www-classic-88ee14ff-20240801";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -1981,7 +1981,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-modern-a7d1240c-20240731";
exports.version = "19.0.0-www-modern-88ee14ff-20240801";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-a7d1240c-20240731";
exports.version = "19.0.0-www-classic-88ee14ff-20240801";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-a7d1240c-20240731";
exports.version = "19.0.0-www-modern-88ee14ff-20240801";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-a7d1240c-20240731";
exports.version = "19.0.0-www-classic-88ee14ff-20240801";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-a7d1240c-20240731";
exports.version = "19.0.0-www-modern-88ee14ff-20240801";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
25 changes: 12 additions & 13 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -5137,8 +5137,7 @@ __DEV__ &&
];
}
function useHostTransitionStatus() {
var status = readContext(HostTransitionContext);
return null !== status ? status : null;
return readContext(HostTransitionContext);
}
function mountId() {
var hook = mountWorkInProgressHook(),
Expand Down Expand Up @@ -14692,6 +14691,14 @@ __DEV__ &&
var scheduleTimeout = setTimeout,
cancelTimeout = clearTimeout,
currentUpdatePriority = 0,
HostTransitionContext = {
$$typeof: REACT_CONTEXT_TYPE,
Provider: null,
Consumer: null,
_currentValue: null,
_currentValue2: null,
_threadCount: 0
},
valueStack = [];
var fiberStack = [];
var index$jscomp$0 = -1;
Expand All @@ -14713,14 +14720,6 @@ __DEV__ &&
contextFiberStackCursor = createCursor(null),
rootInstanceStackCursor = createCursor(null),
hostTransitionProviderCursor = createCursor(null),
HostTransitionContext = {
$$typeof: REACT_CONTEXT_TYPE,
Provider: null,
Consumer: null,
_currentValue: null,
_currentValue2: null,
_threadCount: 0
},
needsEscaping = /["'&<>\n\t]|^\s|\s$/,
hydrationDiffRootDEV = null,
hydrationErrors = null,
Expand Down Expand Up @@ -16783,11 +16782,11 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-classic-a7d1240c-20240731",
version: "19.0.0-www-classic-88ee14ff-20240801",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-www-classic-a7d1240c-20240731"
reconcilerVersion: "19.0.0-www-classic-88ee14ff-20240801"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -16821,7 +16820,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-classic-a7d1240c-20240731";
exports.version = "19.0.0-www-classic-88ee14ff-20240801";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
25 changes: 12 additions & 13 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -5013,8 +5013,7 @@ __DEV__ &&
];
}
function useHostTransitionStatus() {
var status = readContext(HostTransitionContext);
return null !== status ? status : null;
return readContext(HostTransitionContext);
}
function mountId() {
var hook = mountWorkInProgressHook(),
Expand Down Expand Up @@ -14100,6 +14099,14 @@ __DEV__ &&
var scheduleTimeout = setTimeout,
cancelTimeout = clearTimeout,
currentUpdatePriority = 0,
HostTransitionContext = {
$$typeof: REACT_CONTEXT_TYPE,
Provider: null,
Consumer: null,
_currentValue: null,
_currentValue2: null,
_threadCount: 0
},
valueStack = [];
var fiberStack = [];
var index$jscomp$0 = -1,
Expand All @@ -14117,14 +14124,6 @@ __DEV__ &&
contextFiberStackCursor = createCursor(null),
rootInstanceStackCursor = createCursor(null),
hostTransitionProviderCursor = createCursor(null),
HostTransitionContext = {
$$typeof: REACT_CONTEXT_TYPE,
Provider: null,
Consumer: null,
_currentValue: null,
_currentValue2: null,
_threadCount: 0
},
needsEscaping = /["'&<>\n\t]|^\s|\s$/,
hydrationDiffRootDEV = null,
hydrationErrors = null,
Expand Down Expand Up @@ -16196,11 +16195,11 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-modern-a7d1240c-20240731",
version: "19.0.0-www-modern-88ee14ff-20240801",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-www-modern-a7d1240c-20240731"
reconcilerVersion: "19.0.0-www-modern-88ee14ff-20240801"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -16234,7 +16233,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-modern-a7d1240c-20240731";
exports.version = "19.0.0-www-modern-88ee14ff-20240801";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
27 changes: 13 additions & 14 deletions compiled/facebook-www/ReactART-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,14 @@ function shouldSetTextContent(type, props) {
);
}
var currentUpdatePriority = 0,
HostTransitionContext = {
$$typeof: REACT_CONTEXT_TYPE,
Provider: null,
Consumer: null,
_currentValue: null,
_currentValue2: null,
_threadCount: 0
},
valueStack = [],
index = -1;
function createCursor(defaultValue) {
Expand Down Expand Up @@ -1042,15 +1050,7 @@ function createCapturedValueAtFiber(value, source) {
var contextStackCursor = createCursor(null),
contextFiberStackCursor = createCursor(null),
rootInstanceStackCursor = createCursor(null),
hostTransitionProviderCursor = createCursor(null),
HostTransitionContext = {
$$typeof: REACT_CONTEXT_TYPE,
Provider: null,
Consumer: null,
_currentValue: null,
_currentValue2: null,
_threadCount: 0
};
hostTransitionProviderCursor = createCursor(null);
function pushHostContainer(fiber, nextRootInstance) {
push(rootInstanceStackCursor, nextRootInstance);
push(contextFiberStackCursor, fiber);
Expand Down Expand Up @@ -3364,8 +3364,7 @@ function startTransition(
}
}
function useHostTransitionStatus() {
var status = readContext(HostTransitionContext);
return null !== status ? status : null;
return readContext(HostTransitionContext);
}
function updateId() {
return updateWorkInProgressHook().memoizedState;
Expand Down Expand Up @@ -10623,13 +10622,13 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1361 = {
bundleType: 0,
version: "19.0.0-www-classic-a7d1240c-20240731",
version: "19.0.0-www-classic-88ee14ff-20240801",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: function () {
return null;
},
reconcilerVersion: "19.0.0-www-classic-a7d1240c-20240731"
reconcilerVersion: "19.0.0-www-classic-88ee14ff-20240801"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1362 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand All @@ -10655,4 +10654,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-classic-a7d1240c-20240731";
exports.version = "19.0.0-www-classic-88ee14ff-20240801";
27 changes: 13 additions & 14 deletions compiled/facebook-www/ReactART-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,14 @@ function shouldSetTextContent(type, props) {
);
}
var currentUpdatePriority = 0,
HostTransitionContext = {
$$typeof: REACT_CONTEXT_TYPE,
Provider: null,
Consumer: null,
_currentValue: null,
_currentValue2: null,
_threadCount: 0
},
valueStack = [],
index = -1;
function createCursor(defaultValue) {
Expand Down Expand Up @@ -881,15 +889,7 @@ function createCapturedValueAtFiber(value, source) {
var contextStackCursor = createCursor(null),
contextFiberStackCursor = createCursor(null),
rootInstanceStackCursor = createCursor(null),
hostTransitionProviderCursor = createCursor(null),
HostTransitionContext = {
$$typeof: REACT_CONTEXT_TYPE,
Provider: null,
Consumer: null,
_currentValue: null,
_currentValue2: null,
_threadCount: 0
};
hostTransitionProviderCursor = createCursor(null);
function pushHostContainer(fiber, nextRootInstance) {
push(rootInstanceStackCursor, nextRootInstance);
push(contextFiberStackCursor, fiber);
Expand Down Expand Up @@ -3195,8 +3195,7 @@ function startTransition(
}
}
function useHostTransitionStatus() {
var status = readContext(HostTransitionContext);
return null !== status ? status : null;
return readContext(HostTransitionContext);
}
function updateId() {
return updateWorkInProgressHook().memoizedState;
Expand Down Expand Up @@ -10137,13 +10136,13 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1353 = {
bundleType: 0,
version: "19.0.0-www-modern-a7d1240c-20240731",
version: "19.0.0-www-modern-88ee14ff-20240801",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: function () {
return null;
},
reconcilerVersion: "19.0.0-www-modern-a7d1240c-20240731"
reconcilerVersion: "19.0.0-www-modern-88ee14ff-20240801"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1354 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand All @@ -10169,4 +10168,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-modern-a7d1240c-20240731";
exports.version = "19.0.0-www-modern-88ee14ff-20240801";
31 changes: 15 additions & 16 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,7 @@ __DEV__ &&
(pop(contextStackCursor$1, fiber), pop(contextFiberStackCursor, fiber));
hostTransitionProviderCursor.current === fiber &&
(pop(hostTransitionProviderCursor, fiber),
(HostTransitionContext._currentValue = null));
(HostTransitionContext._currentValue = NotPendingTransition));
}
function typeName(value) {
return (
Expand Down Expand Up @@ -7069,8 +7069,7 @@ __DEV__ &&
];
}
function useHostTransitionStatus() {
var status = readContext(HostTransitionContext);
return null !== status ? status : NotPendingTransition;
return readContext(HostTransitionContext);
}
function mountId() {
var hook = mountWorkInProgressHook(),
Expand Down Expand Up @@ -23919,14 +23918,6 @@ __DEV__ &&
contextFiberStackCursor = createCursor(null),
rootInstanceStackCursor = createCursor(null),
hostTransitionProviderCursor = createCursor(null),
HostTransitionContext = {
$$typeof: REACT_CONTEXT_TYPE,
Provider: null,
Consumer: null,
_currentValue: null,
_currentValue2: null,
_threadCount: 0
},
hasOwnProperty = Object.prototype.hasOwnProperty,
allNativeEvents = new Set();
allNativeEvents.add("beforeblur");
Expand Down Expand Up @@ -27507,6 +27498,14 @@ __DEV__ &&
LAST_PRECEDENCE = null,
precedencesByRoot = null,
NotPendingTransition = NotPending,
HostTransitionContext = {
$$typeof: REACT_CONTEXT_TYPE,
Provider: null,
Consumer: null,
_currentValue: NotPendingTransition,
_currentValue2: NotPendingTransition,
_threadCount: 0
},
randomKey = Math.random().toString(36).slice(2),
internalInstanceKey = "__reactFiber$" + randomKey,
internalPropsKey = "__reactProps$" + randomKey,
Expand Down Expand Up @@ -27535,11 +27534,11 @@ __DEV__ &&
: flushSyncErrorInBuildsThatSupportLegacyMode;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-classic-a7d1240c-20240731" !== isomorphicReactPackageVersion)
if ("19.0.0-www-classic-88ee14ff-20240801" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.0.0-www-classic-a7d1240c-20240731\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-classic-88ee14ff-20240801\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -27583,11 +27582,11 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-classic-a7d1240c-20240731",
version: "19.0.0-www-classic-88ee14ff-20240801",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-classic-a7d1240c-20240731"
reconcilerVersion: "19.0.0-www-classic-88ee14ff-20240801"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -28240,7 +28239,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-a7d1240c-20240731";
exports.version = "19.0.0-www-classic-88ee14ff-20240801";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Loading

0 comments on commit 76d8d06

Please sign in to comment.