mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fix: Optimistic update does not get reset (#27453)
I found a bug where if an optimistic update causes a component to
rerender, and there are no other state updates during that render, React
bails out without applying the update.
Whenever a hook detects a change, we must mark the component as dirty to
prevent a bailout. We check for changes by comparing the new state to
`hook.memoizedState`. However, when implementing optimistic state
rebasing, I incorrectly reset `hook.memoizedState` to the incoming base
state, even though I only needed to reset `hook.baseState`. This was
just a mistake on my part.
This wasn't caught by the existing tests because usually when the
optimistic state changes, there's also some other state that marks the
component as dirty in the same render.
I fixed the bug and added a regression test.
DiffTrain build for [85c2b519b5](https://github.com/facebook/react/commit/85c2b519b54269811002d26f4f711809ef68f123)
This commit is contained in:
@@ -1 +1 @@
|
||||
db69f95e4876ec3c24117f58d55cbb4f315b9fa7
|
||||
85c2b519b54269811002d26f4f711809ef68f123
|
||||
|
||||
@@ -27,7 +27,7 @@ if (
|
||||
}
|
||||
"use strict";
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-136a3d2d";
|
||||
var ReactVersion = "18.3.0-www-classic-d32d685e";
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
|
||||
@@ -615,4 +615,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-939a7938";
|
||||
exports.version = "18.3.0-www-modern-d97fc327";
|
||||
|
||||
@@ -626,7 +626,7 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-de10697a";
|
||||
exports.version = "18.3.0-www-modern-7e2c0d38";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-6b865fa6";
|
||||
var ReactVersion = "18.3.0-www-classic-86227a5b";
|
||||
|
||||
var LegacyRoot = 0;
|
||||
var ConcurrentRoot = 1;
|
||||
@@ -9296,9 +9296,9 @@ function updateOptimisticImpl(hook, current, passthrough, reducer) {
|
||||
// as an argument. It's called a passthrough because if there are no pending
|
||||
// updates, it will be returned as-is.
|
||||
//
|
||||
// Reset the base state and memoized state to the passthrough. Future
|
||||
// updates will be applied on top of this.
|
||||
hook.baseState = hook.memoizedState = passthrough; // If a reducer is not provided, default to the same one used by useState.
|
||||
// Reset the base state to the passthrough. Future updates will be applied
|
||||
// on top of this.
|
||||
hook.baseState = passthrough; // If a reducer is not provided, default to the same one used by useState.
|
||||
|
||||
var resolvedReducer =
|
||||
typeof reducer === "function" ? reducer : basicStateReducer;
|
||||
@@ -9319,10 +9319,10 @@ function rerenderOptimistic(passthrough, reducer) {
|
||||
// This is an update. Process the update queue.
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
} // This is a mount. No updates to process.
|
||||
// Reset the base state and memoized state to the passthrough. Future
|
||||
// updates will be applied on top of this.
|
||||
// Reset the base state to the passthrough. Future updates will be applied
|
||||
// on top of this.
|
||||
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
var dispatch = hook.queue.dispatch;
|
||||
return [passthrough, dispatch];
|
||||
} // useFormState actions run sequentially, because each action receives the
|
||||
|
||||
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-5845cabd";
|
||||
var ReactVersion = "18.3.0-www-modern-cb89a149";
|
||||
|
||||
var LegacyRoot = 0;
|
||||
var ConcurrentRoot = 1;
|
||||
@@ -9052,9 +9052,9 @@ function updateOptimisticImpl(hook, current, passthrough, reducer) {
|
||||
// as an argument. It's called a passthrough because if there are no pending
|
||||
// updates, it will be returned as-is.
|
||||
//
|
||||
// Reset the base state and memoized state to the passthrough. Future
|
||||
// updates will be applied on top of this.
|
||||
hook.baseState = hook.memoizedState = passthrough; // If a reducer is not provided, default to the same one used by useState.
|
||||
// Reset the base state to the passthrough. Future updates will be applied
|
||||
// on top of this.
|
||||
hook.baseState = passthrough; // If a reducer is not provided, default to the same one used by useState.
|
||||
|
||||
var resolvedReducer =
|
||||
typeof reducer === "function" ? reducer : basicStateReducer;
|
||||
@@ -9075,10 +9075,10 @@ function rerenderOptimistic(passthrough, reducer) {
|
||||
// This is an update. Process the update queue.
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
} // This is a mount. No updates to process.
|
||||
// Reset the base state and memoized state to the passthrough. Future
|
||||
// updates will be applied on top of this.
|
||||
// Reset the base state to the passthrough. Future updates will be applied
|
||||
// on top of this.
|
||||
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
var dispatch = hook.queue.dispatch;
|
||||
return [passthrough, dispatch];
|
||||
} // useFormState actions run sequentially, because each action receives the
|
||||
|
||||
@@ -3003,7 +3003,7 @@ function updateOptimistic(passthrough, reducer) {
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
}
|
||||
function updateOptimisticImpl(hook, current, passthrough, reducer) {
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return updateReducerImpl(
|
||||
hook,
|
||||
currentHook,
|
||||
@@ -3014,7 +3014,7 @@ function rerenderOptimistic(passthrough, reducer) {
|
||||
var hook = updateWorkInProgressHook();
|
||||
if (null !== currentHook)
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return [passthrough, hook.queue.dispatch];
|
||||
}
|
||||
function pushEffect(tag, create, inst, deps) {
|
||||
@@ -10107,7 +10107,7 @@ var slice = Array.prototype.slice,
|
||||
return null;
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-2b1e1230",
|
||||
version: "18.3.0-www-classic-8867a970",
|
||||
rendererPackageName: "react-art"
|
||||
};
|
||||
var internals$jscomp$inline_1304 = {
|
||||
@@ -10138,7 +10138,7 @@ var internals$jscomp$inline_1304 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-classic-2b1e1230"
|
||||
reconcilerVersion: "18.3.0-www-classic-8867a970"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1305 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
@@ -2809,7 +2809,7 @@ function updateOptimistic(passthrough, reducer) {
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
}
|
||||
function updateOptimisticImpl(hook, current, passthrough, reducer) {
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return updateReducerImpl(
|
||||
hook,
|
||||
currentHook,
|
||||
@@ -2820,7 +2820,7 @@ function rerenderOptimistic(passthrough, reducer) {
|
||||
var hook = updateWorkInProgressHook();
|
||||
if (null !== currentHook)
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return [passthrough, hook.queue.dispatch];
|
||||
}
|
||||
function pushEffect(tag, create, inst, deps) {
|
||||
@@ -9772,7 +9772,7 @@ var slice = Array.prototype.slice,
|
||||
return null;
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-d368bffd",
|
||||
version: "18.3.0-www-modern-46965381",
|
||||
rendererPackageName: "react-art"
|
||||
};
|
||||
var internals$jscomp$inline_1284 = {
|
||||
@@ -9803,7 +9803,7 @@ var internals$jscomp$inline_1284 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-modern-d368bffd"
|
||||
reconcilerVersion: "18.3.0-www-modern-46965381"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1285 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
@@ -13843,9 +13843,9 @@ function updateOptimisticImpl(hook, current, passthrough, reducer) {
|
||||
// as an argument. It's called a passthrough because if there are no pending
|
||||
// updates, it will be returned as-is.
|
||||
//
|
||||
// Reset the base state and memoized state to the passthrough. Future
|
||||
// updates will be applied on top of this.
|
||||
hook.baseState = hook.memoizedState = passthrough; // If a reducer is not provided, default to the same one used by useState.
|
||||
// Reset the base state to the passthrough. Future updates will be applied
|
||||
// on top of this.
|
||||
hook.baseState = passthrough; // If a reducer is not provided, default to the same one used by useState.
|
||||
|
||||
var resolvedReducer =
|
||||
typeof reducer === "function" ? reducer : basicStateReducer;
|
||||
@@ -13866,10 +13866,10 @@ function rerenderOptimistic(passthrough, reducer) {
|
||||
// This is an update. Process the update queue.
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
} // This is a mount. No updates to process.
|
||||
// Reset the base state and memoized state to the passthrough. Future
|
||||
// updates will be applied on top of this.
|
||||
// Reset the base state to the passthrough. Future updates will be applied
|
||||
// on top of this.
|
||||
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
var dispatch = hook.queue.dispatch;
|
||||
return [passthrough, dispatch];
|
||||
} // useFormState actions run sequentially, because each action receives the
|
||||
@@ -33976,7 +33976,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-85c09bff";
|
||||
var ReactVersion = "18.3.0-www-classic-43da500c";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -13784,9 +13784,9 @@ function updateOptimisticImpl(hook, current, passthrough, reducer) {
|
||||
// as an argument. It's called a passthrough because if there are no pending
|
||||
// updates, it will be returned as-is.
|
||||
//
|
||||
// Reset the base state and memoized state to the passthrough. Future
|
||||
// updates will be applied on top of this.
|
||||
hook.baseState = hook.memoizedState = passthrough; // If a reducer is not provided, default to the same one used by useState.
|
||||
// Reset the base state to the passthrough. Future updates will be applied
|
||||
// on top of this.
|
||||
hook.baseState = passthrough; // If a reducer is not provided, default to the same one used by useState.
|
||||
|
||||
var resolvedReducer =
|
||||
typeof reducer === "function" ? reducer : basicStateReducer;
|
||||
@@ -13807,10 +13807,10 @@ function rerenderOptimistic(passthrough, reducer) {
|
||||
// This is an update. Process the update queue.
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
} // This is a mount. No updates to process.
|
||||
// Reset the base state and memoized state to the passthrough. Future
|
||||
// updates will be applied on top of this.
|
||||
// Reset the base state to the passthrough. Future updates will be applied
|
||||
// on top of this.
|
||||
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
var dispatch = hook.queue.dispatch;
|
||||
return [passthrough, dispatch];
|
||||
} // useFormState actions run sequentially, because each action receives the
|
||||
@@ -33821,7 +33821,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-c7df3b44";
|
||||
var ReactVersion = "18.3.0-www-modern-a850f7df";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -3743,7 +3743,7 @@ function updateOptimistic(passthrough, reducer) {
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
}
|
||||
function updateOptimisticImpl(hook, current, passthrough, reducer) {
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return updateReducerImpl(
|
||||
hook,
|
||||
currentHook,
|
||||
@@ -3754,7 +3754,7 @@ function rerenderOptimistic(passthrough, reducer) {
|
||||
var hook = updateWorkInProgressHook();
|
||||
if (null !== currentHook)
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return [passthrough, hook.queue.dispatch];
|
||||
}
|
||||
function pushEffect(tag, create, inst, deps) {
|
||||
@@ -16375,7 +16375,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1779 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-a202a369",
|
||||
version: "18.3.0-www-classic-649be7ad",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
var internals$jscomp$inline_2123 = {
|
||||
@@ -16405,7 +16405,7 @@ var internals$jscomp$inline_2123 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-classic-a202a369"
|
||||
reconcilerVersion: "18.3.0-www-classic-649be7ad"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2124 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -16742,4 +16742,4 @@ exports.unstable_renderSubtreeIntoContainer = function (
|
||||
);
|
||||
};
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-www-classic-a202a369";
|
||||
exports.version = "18.3.0-www-classic-649be7ad";
|
||||
|
||||
@@ -3636,7 +3636,7 @@ function updateOptimistic(passthrough, reducer) {
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
}
|
||||
function updateOptimisticImpl(hook, current, passthrough, reducer) {
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return updateReducerImpl(
|
||||
hook,
|
||||
currentHook,
|
||||
@@ -3647,7 +3647,7 @@ function rerenderOptimistic(passthrough, reducer) {
|
||||
var hook = updateWorkInProgressHook();
|
||||
if (null !== currentHook)
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return [passthrough, hook.queue.dispatch];
|
||||
}
|
||||
function pushEffect(tag, create, inst, deps) {
|
||||
@@ -15897,7 +15897,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1738 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-7e008df6",
|
||||
version: "18.3.0-www-modern-ea5134e6",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
var internals$jscomp$inline_2087 = {
|
||||
@@ -15928,7 +15928,7 @@ var internals$jscomp$inline_2087 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-modern-7e008df6"
|
||||
reconcilerVersion: "18.3.0-www-modern-ea5134e6"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2088 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -16193,4 +16193,4 @@ exports.unstable_createEventHandle = function (type, options) {
|
||||
return eventHandle;
|
||||
};
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-www-modern-7e008df6";
|
||||
exports.version = "18.3.0-www-modern-ea5134e6";
|
||||
|
||||
@@ -3889,7 +3889,7 @@ function updateOptimistic(passthrough, reducer) {
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
}
|
||||
function updateOptimisticImpl(hook, current, passthrough, reducer) {
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return updateReducerImpl(
|
||||
hook,
|
||||
currentHook,
|
||||
@@ -3900,7 +3900,7 @@ function rerenderOptimistic(passthrough, reducer) {
|
||||
var hook = updateWorkInProgressHook();
|
||||
if (null !== currentHook)
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return [passthrough, hook.queue.dispatch];
|
||||
}
|
||||
function pushEffect(tag, create, inst, deps) {
|
||||
@@ -17150,7 +17150,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1864 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-bf660d13",
|
||||
version: "18.3.0-www-classic-ea6b16b5",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
(function (internals) {
|
||||
@@ -17194,7 +17194,7 @@ var devToolsConfig$jscomp$inline_1864 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-classic-bf660d13"
|
||||
reconcilerVersion: "18.3.0-www-classic-ea6b16b5"
|
||||
});
|
||||
assign(Internals, {
|
||||
ReactBrowserEventEmitter: {
|
||||
@@ -17518,7 +17518,7 @@ exports.unstable_renderSubtreeIntoContainer = function (
|
||||
);
|
||||
};
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-www-classic-bf660d13";
|
||||
exports.version = "18.3.0-www-classic-ea6b16b5";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
@@ -3782,7 +3782,7 @@ function updateOptimistic(passthrough, reducer) {
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
}
|
||||
function updateOptimisticImpl(hook, current, passthrough, reducer) {
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return updateReducerImpl(
|
||||
hook,
|
||||
currentHook,
|
||||
@@ -3793,7 +3793,7 @@ function rerenderOptimistic(passthrough, reducer) {
|
||||
var hook = updateWorkInProgressHook();
|
||||
if (null !== currentHook)
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return [passthrough, hook.queue.dispatch];
|
||||
}
|
||||
function pushEffect(tag, create, inst, deps) {
|
||||
@@ -16666,7 +16666,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1823 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-9d2908e6",
|
||||
version: "18.3.0-www-modern-bff6f39a",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
(function (internals) {
|
||||
@@ -16711,7 +16711,7 @@ var devToolsConfig$jscomp$inline_1823 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-modern-9d2908e6"
|
||||
reconcilerVersion: "18.3.0-www-modern-bff6f39a"
|
||||
});
|
||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
|
||||
exports.createPortal = function (children, container) {
|
||||
@@ -16963,7 +16963,7 @@ exports.unstable_createEventHandle = function (type, options) {
|
||||
return eventHandle;
|
||||
};
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-www-modern-9d2908e6";
|
||||
exports.version = "18.3.0-www-modern-bff6f39a";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
@@ -19,7 +19,7 @@ if (__DEV__) {
|
||||
var React = require("react");
|
||||
var ReactDOM = require("react-dom");
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-5845cabd";
|
||||
var ReactVersion = "18.3.0-www-modern-cb89a149";
|
||||
|
||||
// This refers to a WWW module.
|
||||
var warningWWW = require("warning");
|
||||
|
||||
@@ -4965,4 +4965,4 @@ exports.renderToString = function (children, options) {
|
||||
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
|
||||
);
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-d368bffd";
|
||||
exports.version = "18.3.0-www-modern-46965381";
|
||||
|
||||
@@ -13977,9 +13977,9 @@ function updateOptimisticImpl(hook, current, passthrough, reducer) {
|
||||
// as an argument. It's called a passthrough because if there are no pending
|
||||
// updates, it will be returned as-is.
|
||||
//
|
||||
// Reset the base state and memoized state to the passthrough. Future
|
||||
// updates will be applied on top of this.
|
||||
hook.baseState = hook.memoizedState = passthrough; // If a reducer is not provided, default to the same one used by useState.
|
||||
// Reset the base state to the passthrough. Future updates will be applied
|
||||
// on top of this.
|
||||
hook.baseState = passthrough; // If a reducer is not provided, default to the same one used by useState.
|
||||
|
||||
var resolvedReducer =
|
||||
typeof reducer === "function" ? reducer : basicStateReducer;
|
||||
@@ -14000,10 +14000,10 @@ function rerenderOptimistic(passthrough, reducer) {
|
||||
// This is an update. Process the update queue.
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
} // This is a mount. No updates to process.
|
||||
// Reset the base state and memoized state to the passthrough. Future
|
||||
// updates will be applied on top of this.
|
||||
// Reset the base state to the passthrough. Future updates will be applied
|
||||
// on top of this.
|
||||
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
var dispatch = hook.queue.dispatch;
|
||||
return [passthrough, dispatch];
|
||||
} // useFormState actions run sequentially, because each action receives the
|
||||
@@ -34593,7 +34593,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-32c273fd";
|
||||
var ReactVersion = "18.3.0-www-classic-7b09e670";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -13918,9 +13918,9 @@ function updateOptimisticImpl(hook, current, passthrough, reducer) {
|
||||
// as an argument. It's called a passthrough because if there are no pending
|
||||
// updates, it will be returned as-is.
|
||||
//
|
||||
// Reset the base state and memoized state to the passthrough. Future
|
||||
// updates will be applied on top of this.
|
||||
hook.baseState = hook.memoizedState = passthrough; // If a reducer is not provided, default to the same one used by useState.
|
||||
// Reset the base state to the passthrough. Future updates will be applied
|
||||
// on top of this.
|
||||
hook.baseState = passthrough; // If a reducer is not provided, default to the same one used by useState.
|
||||
|
||||
var resolvedReducer =
|
||||
typeof reducer === "function" ? reducer : basicStateReducer;
|
||||
@@ -13941,10 +13941,10 @@ function rerenderOptimistic(passthrough, reducer) {
|
||||
// This is an update. Process the update queue.
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
} // This is a mount. No updates to process.
|
||||
// Reset the base state and memoized state to the passthrough. Future
|
||||
// updates will be applied on top of this.
|
||||
// Reset the base state to the passthrough. Future updates will be applied
|
||||
// on top of this.
|
||||
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
var dispatch = hook.queue.dispatch;
|
||||
return [passthrough, dispatch];
|
||||
} // useFormState actions run sequentially, because each action receives the
|
||||
@@ -34438,7 +34438,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-939a7938";
|
||||
var ReactVersion = "18.3.0-www-modern-d97fc327";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -3829,7 +3829,7 @@ function updateOptimistic(passthrough, reducer) {
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
}
|
||||
function updateOptimisticImpl(hook, current, passthrough, reducer) {
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return updateReducerImpl(
|
||||
hook,
|
||||
currentHook,
|
||||
@@ -3840,7 +3840,7 @@ function rerenderOptimistic(passthrough, reducer) {
|
||||
var hook = updateWorkInProgressHook();
|
||||
if (null !== currentHook)
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return [passthrough, hook.queue.dispatch];
|
||||
}
|
||||
function pushEffect(tag, create, inst, deps) {
|
||||
@@ -16704,7 +16704,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1808 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-136a3d2d",
|
||||
version: "18.3.0-www-classic-d32d685e",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
var internals$jscomp$inline_2157 = {
|
||||
@@ -16734,7 +16734,7 @@ var internals$jscomp$inline_2157 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-classic-136a3d2d"
|
||||
reconcilerVersion: "18.3.0-www-classic-d32d685e"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2158 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -17222,4 +17222,4 @@ exports.unstable_renderSubtreeIntoContainer = function (
|
||||
);
|
||||
};
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-www-classic-136a3d2d";
|
||||
exports.version = "18.3.0-www-classic-d32d685e";
|
||||
|
||||
@@ -3777,7 +3777,7 @@ function updateOptimistic(passthrough, reducer) {
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
}
|
||||
function updateOptimisticImpl(hook, current, passthrough, reducer) {
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return updateReducerImpl(
|
||||
hook,
|
||||
currentHook,
|
||||
@@ -3788,7 +3788,7 @@ function rerenderOptimistic(passthrough, reducer) {
|
||||
var hook = updateWorkInProgressHook();
|
||||
if (null !== currentHook)
|
||||
return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
|
||||
hook.baseState = hook.memoizedState = passthrough;
|
||||
hook.baseState = passthrough;
|
||||
return [passthrough, hook.queue.dispatch];
|
||||
}
|
||||
function pushEffect(tag, create, inst, deps) {
|
||||
@@ -16281,7 +16281,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1767 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-de10697a",
|
||||
version: "18.3.0-www-modern-7e2c0d38",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
var internals$jscomp$inline_2121 = {
|
||||
@@ -16312,7 +16312,7 @@ var internals$jscomp$inline_2121 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-modern-de10697a"
|
||||
reconcilerVersion: "18.3.0-www-modern-7e2c0d38"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2122 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -16728,4 +16728,4 @@ exports.unstable_createEventHandle = function (type, options) {
|
||||
return eventHandle;
|
||||
};
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-www-modern-de10697a";
|
||||
exports.version = "18.3.0-www-modern-7e2c0d38";
|
||||
|
||||
Reference in New Issue
Block a user