mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fix: Use action implementation at time of dispatch (#29618)
Fixes the behavior of actions that are queued by useActionState to use the action function that was current at the time it was dispatched, not at the time it eventually executes. The conceptual model is that the action is immediately dispatched, as if it were sent to a remote server/worker. It's the remote worker that maintains the queue, not the client. This is another property of actions makes them more like event handlers than like reducers. DiffTrain build for commit https://github.com/facebook/react/commit/163122766b6008e992898b00f1fe3b104ed78737.
This commit is contained in:
+18
-9
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<5d2de112982cec5eac69c9d1f8e71fe5>>
|
||||
* @generated SignedSource<<b01346a616a954f7e5c6aa02b898719f>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -8595,26 +8595,26 @@ function dispatchActionState(fiber, actionQueue, setPendingState, setState, payl
|
||||
// it immediately.
|
||||
var newLast = {
|
||||
payload: payload,
|
||||
action: actionQueue.action,
|
||||
next: null // circular
|
||||
|
||||
};
|
||||
newLast.next = actionQueue.pending = newLast;
|
||||
runActionStateAction(actionQueue, setPendingState, setState, payload);
|
||||
runActionStateAction(actionQueue, setPendingState, setState, newLast);
|
||||
} else {
|
||||
// There's already an action running. Add to the queue.
|
||||
var first = last.next;
|
||||
var _newLast = {
|
||||
payload: payload,
|
||||
action: actionQueue.action,
|
||||
next: first
|
||||
};
|
||||
actionQueue.pending = last.next = _newLast;
|
||||
}
|
||||
}
|
||||
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
var action = actionQueue.action;
|
||||
var prevState = actionQueue.state; // This is a fork of startTransition
|
||||
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, node) {
|
||||
// This is a fork of startTransition
|
||||
var prevTransition = ReactSharedInternals.T;
|
||||
var currentTransition = {};
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
@@ -8625,7 +8625,16 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
// This will be reverted automatically when all actions are finished.
|
||||
|
||||
|
||||
setPendingState(true);
|
||||
setPendingState(true); // `node.action` represents the action function at the time it was dispatched.
|
||||
// If this action was queued, it might be stale, i.e. it's not necessarily the
|
||||
// most current implementation of the action, stored on `actionQueue`. This is
|
||||
// intentional. The conceptual model for queued actions is that they are
|
||||
// queued in a remote worker; the dispatch happens immediately, only the
|
||||
// execution is delayed.
|
||||
|
||||
var action = node.action;
|
||||
var payload = node.payload;
|
||||
var prevState = actionQueue.state;
|
||||
|
||||
try {
|
||||
var returnValue = action(prevState, payload);
|
||||
@@ -8698,7 +8707,7 @@ function finishRunningActionStateAction(actionQueue, setPendingState, setState)
|
||||
var next = first.next;
|
||||
last.next = next; // Run the next action.
|
||||
|
||||
runActionStateAction(actionQueue, setPendingState, setState, next.payload);
|
||||
runActionStateAction(actionQueue, setPendingState, setState, next);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23462,7 +23471,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = '19.0.0-rc-44b67cc6';
|
||||
var ReactVersion = '19.0.0-rc-0d4b9126';
|
||||
|
||||
/*
|
||||
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
|
||||
|
||||
+13
-17
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<c50a413ebb22fd09d88e5c0cbdee55c9>>
|
||||
* @generated SignedSource<<b82ab7c9a033e33f8860c7aed3aa5cae>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -2773,21 +2773,22 @@ function dispatchActionState(
|
||||
throw Error("Cannot update form state while rendering.");
|
||||
fiber = actionQueue.pending;
|
||||
null === fiber
|
||||
? ((fiber = { payload: payload, next: null }),
|
||||
(fiber.next = actionQueue.pending = fiber),
|
||||
? ((payload = { payload: payload, action: actionQueue.action, next: null }),
|
||||
(payload.next = actionQueue.pending = payload),
|
||||
runActionStateAction(actionQueue, setPendingState, setState, payload))
|
||||
: (actionQueue.pending = fiber.next =
|
||||
{ payload: payload, next: fiber.next });
|
||||
{ payload: payload, action: actionQueue.action, next: fiber.next });
|
||||
}
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
var action = actionQueue.action,
|
||||
prevState = actionQueue.state,
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, node) {
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = {};
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
setPendingState(!0);
|
||||
var action = node.action;
|
||||
node = node.payload;
|
||||
var prevState = actionQueue.state;
|
||||
try {
|
||||
var returnValue = action(prevState, payload),
|
||||
var returnValue = action(prevState, node),
|
||||
onStartTransitionFinish = ReactSharedInternals.S;
|
||||
null !== onStartTransitionFinish &&
|
||||
onStartTransitionFinish(currentTransition, returnValue);
|
||||
@@ -2834,12 +2835,7 @@ function finishRunningActionStateAction(
|
||||
? (actionQueue.pending = null)
|
||||
: ((first = first.next),
|
||||
(last.next = first),
|
||||
runActionStateAction(
|
||||
actionQueue,
|
||||
setPendingState,
|
||||
setState,
|
||||
first.payload
|
||||
));
|
||||
runActionStateAction(actionQueue, setPendingState, setState, first));
|
||||
}
|
||||
}
|
||||
function actionStateReducer(oldState, newState) {
|
||||
@@ -9302,7 +9298,7 @@ var devToolsConfig$jscomp$inline_1047 = {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "19.0.0-rc-96bb2a1a",
|
||||
version: "19.0.0-rc-135fcf29",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
var internals$jscomp$inline_1234 = {
|
||||
@@ -9333,7 +9329,7 @@ var internals$jscomp$inline_1234 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-rc-96bb2a1a"
|
||||
reconcilerVersion: "19.0.0-rc-135fcf29"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1235 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+13
-17
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<382b340fe45aa68c7ed8c70111650a72>>
|
||||
* @generated SignedSource<<b303e864c1beaa1151f860061b09a0be>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -2861,21 +2861,22 @@ function dispatchActionState(
|
||||
throw Error("Cannot update form state while rendering.");
|
||||
fiber = actionQueue.pending;
|
||||
null === fiber
|
||||
? ((fiber = { payload: payload, next: null }),
|
||||
(fiber.next = actionQueue.pending = fiber),
|
||||
? ((payload = { payload: payload, action: actionQueue.action, next: null }),
|
||||
(payload.next = actionQueue.pending = payload),
|
||||
runActionStateAction(actionQueue, setPendingState, setState, payload))
|
||||
: (actionQueue.pending = fiber.next =
|
||||
{ payload: payload, next: fiber.next });
|
||||
{ payload: payload, action: actionQueue.action, next: fiber.next });
|
||||
}
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
var action = actionQueue.action,
|
||||
prevState = actionQueue.state,
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, node) {
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = {};
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
setPendingState(!0);
|
||||
var action = node.action;
|
||||
node = node.payload;
|
||||
var prevState = actionQueue.state;
|
||||
try {
|
||||
var returnValue = action(prevState, payload),
|
||||
var returnValue = action(prevState, node),
|
||||
onStartTransitionFinish = ReactSharedInternals.S;
|
||||
null !== onStartTransitionFinish &&
|
||||
onStartTransitionFinish(currentTransition, returnValue);
|
||||
@@ -2922,12 +2923,7 @@ function finishRunningActionStateAction(
|
||||
? (actionQueue.pending = null)
|
||||
: ((first = first.next),
|
||||
(last.next = first),
|
||||
runActionStateAction(
|
||||
actionQueue,
|
||||
setPendingState,
|
||||
setState,
|
||||
first.payload
|
||||
));
|
||||
runActionStateAction(actionQueue, setPendingState, setState, first));
|
||||
}
|
||||
}
|
||||
function actionStateReducer(oldState, newState) {
|
||||
@@ -9924,7 +9920,7 @@ var devToolsConfig$jscomp$inline_1130 = {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "19.0.0-rc-d4795057",
|
||||
version: "19.0.0-rc-17313e5b",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
(function (internals) {
|
||||
@@ -9968,7 +9964,7 @@ var devToolsConfig$jscomp$inline_1130 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-rc-d4795057"
|
||||
reconcilerVersion: "19.0.0-rc-17313e5b"
|
||||
});
|
||||
exports._Scheduler = Scheduler;
|
||||
exports.act = act;
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
2787eebe52864356252a280fd811cd9d52807a82
|
||||
163122766b6008e992898b00f1fe3b104ed78737
|
||||
|
||||
+18
-9
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<d66dfe0f482a855f5a25c6611f697b38>>
|
||||
* @generated SignedSource<<e788833561fd15923c3878d11f308805>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -11341,26 +11341,26 @@ function dispatchActionState(fiber, actionQueue, setPendingState, setState, payl
|
||||
// it immediately.
|
||||
var newLast = {
|
||||
payload: payload,
|
||||
action: actionQueue.action,
|
||||
next: null // circular
|
||||
|
||||
};
|
||||
newLast.next = actionQueue.pending = newLast;
|
||||
runActionStateAction(actionQueue, setPendingState, setState, payload);
|
||||
runActionStateAction(actionQueue, setPendingState, setState, newLast);
|
||||
} else {
|
||||
// There's already an action running. Add to the queue.
|
||||
var first = last.next;
|
||||
var _newLast = {
|
||||
payload: payload,
|
||||
action: actionQueue.action,
|
||||
next: first
|
||||
};
|
||||
actionQueue.pending = last.next = _newLast;
|
||||
}
|
||||
}
|
||||
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
var action = actionQueue.action;
|
||||
var prevState = actionQueue.state; // This is a fork of startTransition
|
||||
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, node) {
|
||||
// This is a fork of startTransition
|
||||
var prevTransition = ReactSharedInternals.T;
|
||||
var currentTransition = {};
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
@@ -11371,7 +11371,16 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
// This will be reverted automatically when all actions are finished.
|
||||
|
||||
|
||||
setPendingState(true);
|
||||
setPendingState(true); // `node.action` represents the action function at the time it was dispatched.
|
||||
// If this action was queued, it might be stale, i.e. it's not necessarily the
|
||||
// most current implementation of the action, stored on `actionQueue`. This is
|
||||
// intentional. The conceptual model for queued actions is that they are
|
||||
// queued in a remote worker; the dispatch happens immediately, only the
|
||||
// execution is delayed.
|
||||
|
||||
var action = node.action;
|
||||
var payload = node.payload;
|
||||
var prevState = actionQueue.state;
|
||||
|
||||
try {
|
||||
var returnValue = action(prevState, payload);
|
||||
@@ -11444,7 +11453,7 @@ function finishRunningActionStateAction(actionQueue, setPendingState, setState)
|
||||
var next = first.next;
|
||||
last.next = next; // Run the next action.
|
||||
|
||||
runActionStateAction(actionQueue, setPendingState, setState, next.payload);
|
||||
runActionStateAction(actionQueue, setPendingState, setState, next);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26203,7 +26212,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = '19.0.0-rc-571af8c1';
|
||||
var ReactVersion = '19.0.0-rc-e4976d97';
|
||||
|
||||
/*
|
||||
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
|
||||
|
||||
+13
-17
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<2010209dd2101a00236bbe4927c1ce22>>
|
||||
* @generated SignedSource<<90fa919b6a227b2cc430690a633373b6>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -4153,21 +4153,22 @@ function dispatchActionState(
|
||||
throw Error("Cannot update form state while rendering.");
|
||||
fiber = actionQueue.pending;
|
||||
null === fiber
|
||||
? ((fiber = { payload: payload, next: null }),
|
||||
(fiber.next = actionQueue.pending = fiber),
|
||||
? ((payload = { payload: payload, action: actionQueue.action, next: null }),
|
||||
(payload.next = actionQueue.pending = payload),
|
||||
runActionStateAction(actionQueue, setPendingState, setState, payload))
|
||||
: (actionQueue.pending = fiber.next =
|
||||
{ payload: payload, next: fiber.next });
|
||||
{ payload: payload, action: actionQueue.action, next: fiber.next });
|
||||
}
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
var action = actionQueue.action,
|
||||
prevState = actionQueue.state,
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, node) {
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = {};
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
setPendingState(!0);
|
||||
var action = node.action;
|
||||
node = node.payload;
|
||||
var prevState = actionQueue.state;
|
||||
try {
|
||||
var returnValue = action(prevState, payload),
|
||||
var returnValue = action(prevState, node),
|
||||
onStartTransitionFinish = ReactSharedInternals.S;
|
||||
null !== onStartTransitionFinish &&
|
||||
onStartTransitionFinish(currentTransition, returnValue);
|
||||
@@ -4214,12 +4215,7 @@ function finishRunningActionStateAction(
|
||||
? (actionQueue.pending = null)
|
||||
: ((first = first.next),
|
||||
(last.next = first),
|
||||
runActionStateAction(
|
||||
actionQueue,
|
||||
setPendingState,
|
||||
setState,
|
||||
first.payload
|
||||
));
|
||||
runActionStateAction(actionQueue, setPendingState, setState, first));
|
||||
}
|
||||
}
|
||||
function actionStateReducer(oldState, newState) {
|
||||
@@ -10558,7 +10554,7 @@ var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1124 = {
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "19.0.0-rc-68b4213e",
|
||||
version: "19.0.0-rc-515f4c11",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -10601,7 +10597,7 @@ var internals$jscomp$inline_1354 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-rc-68b4213e"
|
||||
reconcilerVersion: "19.0.0-rc-515f4c11"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1355 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+13
-17
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<8bf9b34548f4c8e979ea4fc8b49091e3>>
|
||||
* @generated SignedSource<<f9a5a11486f200f08e59ce3e06fc28a3>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -4275,21 +4275,22 @@ function dispatchActionState(
|
||||
throw Error("Cannot update form state while rendering.");
|
||||
fiber = actionQueue.pending;
|
||||
null === fiber
|
||||
? ((fiber = { payload: payload, next: null }),
|
||||
(fiber.next = actionQueue.pending = fiber),
|
||||
? ((payload = { payload: payload, action: actionQueue.action, next: null }),
|
||||
(payload.next = actionQueue.pending = payload),
|
||||
runActionStateAction(actionQueue, setPendingState, setState, payload))
|
||||
: (actionQueue.pending = fiber.next =
|
||||
{ payload: payload, next: fiber.next });
|
||||
{ payload: payload, action: actionQueue.action, next: fiber.next });
|
||||
}
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
var action = actionQueue.action,
|
||||
prevState = actionQueue.state,
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, node) {
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = {};
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
setPendingState(!0);
|
||||
var action = node.action;
|
||||
node = node.payload;
|
||||
var prevState = actionQueue.state;
|
||||
try {
|
||||
var returnValue = action(prevState, payload),
|
||||
var returnValue = action(prevState, node),
|
||||
onStartTransitionFinish = ReactSharedInternals.S;
|
||||
null !== onStartTransitionFinish &&
|
||||
onStartTransitionFinish(currentTransition, returnValue);
|
||||
@@ -4336,12 +4337,7 @@ function finishRunningActionStateAction(
|
||||
? (actionQueue.pending = null)
|
||||
: ((first = first.next),
|
||||
(last.next = first),
|
||||
runActionStateAction(
|
||||
actionQueue,
|
||||
setPendingState,
|
||||
setState,
|
||||
first.payload
|
||||
));
|
||||
runActionStateAction(actionQueue, setPendingState, setState, first));
|
||||
}
|
||||
}
|
||||
function actionStateReducer(oldState, newState) {
|
||||
@@ -11264,7 +11260,7 @@ var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1205 = {
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "19.0.0-rc-30caa758",
|
||||
version: "19.0.0-rc-1abc9c11",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -11320,7 +11316,7 @@ var roots = new Map(),
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-rc-30caa758"
|
||||
reconcilerVersion: "19.0.0-rc-1abc9c11"
|
||||
});
|
||||
exports.createPortal = function (children, containerTag) {
|
||||
return createPortal$1(
|
||||
|
||||
+18
-9
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<99a2a7f7d6e7d571646aa72aabedfaa0>>
|
||||
* @generated SignedSource<<40a0e1ce33bc52f3d6d9fc7ae12f7651>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -11518,26 +11518,26 @@ function dispatchActionState(fiber, actionQueue, setPendingState, setState, payl
|
||||
// it immediately.
|
||||
var newLast = {
|
||||
payload: payload,
|
||||
action: actionQueue.action,
|
||||
next: null // circular
|
||||
|
||||
};
|
||||
newLast.next = actionQueue.pending = newLast;
|
||||
runActionStateAction(actionQueue, setPendingState, setState, payload);
|
||||
runActionStateAction(actionQueue, setPendingState, setState, newLast);
|
||||
} else {
|
||||
// There's already an action running. Add to the queue.
|
||||
var first = last.next;
|
||||
var _newLast = {
|
||||
payload: payload,
|
||||
action: actionQueue.action,
|
||||
next: first
|
||||
};
|
||||
actionQueue.pending = last.next = _newLast;
|
||||
}
|
||||
}
|
||||
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
var action = actionQueue.action;
|
||||
var prevState = actionQueue.state; // This is a fork of startTransition
|
||||
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, node) {
|
||||
// This is a fork of startTransition
|
||||
var prevTransition = ReactSharedInternals.T;
|
||||
var currentTransition = {};
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
@@ -11548,7 +11548,16 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
// This will be reverted automatically when all actions are finished.
|
||||
|
||||
|
||||
setPendingState(true);
|
||||
setPendingState(true); // `node.action` represents the action function at the time it was dispatched.
|
||||
// If this action was queued, it might be stale, i.e. it's not necessarily the
|
||||
// most current implementation of the action, stored on `actionQueue`. This is
|
||||
// intentional. The conceptual model for queued actions is that they are
|
||||
// queued in a remote worker; the dispatch happens immediately, only the
|
||||
// execution is delayed.
|
||||
|
||||
var action = node.action;
|
||||
var payload = node.payload;
|
||||
var prevState = actionQueue.state;
|
||||
|
||||
try {
|
||||
var returnValue = action(prevState, payload);
|
||||
@@ -11621,7 +11630,7 @@ function finishRunningActionStateAction(actionQueue, setPendingState, setState)
|
||||
var next = first.next;
|
||||
last.next = next; // Run the next action.
|
||||
|
||||
runActionStateAction(actionQueue, setPendingState, setState, next.payload);
|
||||
runActionStateAction(actionQueue, setPendingState, setState, next);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26553,7 +26562,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = '19.0.0-rc-c2f0c7bb';
|
||||
var ReactVersion = '19.0.0-rc-a40621a5';
|
||||
|
||||
/*
|
||||
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
|
||||
|
||||
+15
-19
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<247c643cf9a4130707253f9a40761f49>>
|
||||
* @generated SignedSource<<d07de192b2df40db5d44ec6c2d08edb2>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -4176,21 +4176,22 @@ function dispatchActionState(
|
||||
throw Error("Cannot update form state while rendering.");
|
||||
fiber = actionQueue.pending;
|
||||
null === fiber
|
||||
? ((fiber = { payload: payload, next: null }),
|
||||
(fiber.next = actionQueue.pending = fiber),
|
||||
? ((payload = { payload: payload, action: actionQueue.action, next: null }),
|
||||
(payload.next = actionQueue.pending = payload),
|
||||
runActionStateAction(actionQueue, setPendingState, setState, payload))
|
||||
: (actionQueue.pending = fiber.next =
|
||||
{ payload: payload, next: fiber.next });
|
||||
{ payload: payload, action: actionQueue.action, next: fiber.next });
|
||||
}
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
var action = actionQueue.action,
|
||||
prevState = actionQueue.state,
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, node) {
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = {};
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
setPendingState(!0);
|
||||
var action = node.action;
|
||||
node = node.payload;
|
||||
var prevState = actionQueue.state;
|
||||
try {
|
||||
var returnValue = action(prevState, payload),
|
||||
var returnValue = action(prevState, node),
|
||||
onStartTransitionFinish = ReactSharedInternals.S;
|
||||
null !== onStartTransitionFinish &&
|
||||
onStartTransitionFinish(currentTransition, returnValue);
|
||||
@@ -4237,12 +4238,7 @@ function finishRunningActionStateAction(
|
||||
? (actionQueue.pending = null)
|
||||
: ((first = first.next),
|
||||
(last.next = first),
|
||||
runActionStateAction(
|
||||
actionQueue,
|
||||
setPendingState,
|
||||
setState,
|
||||
first.payload
|
||||
));
|
||||
runActionStateAction(actionQueue, setPendingState, setState, first));
|
||||
}
|
||||
}
|
||||
function actionStateReducer(oldState, newState) {
|
||||
@@ -10700,11 +10696,11 @@ function traverseOwnerTreeUp(hierarchy, instance) {
|
||||
traverseOwnerTreeUp(hierarchy, instance);
|
||||
}
|
||||
var isomorphicReactPackageVersion = React.version;
|
||||
if ("19.0.0-rc-28c9760f" !== isomorphicReactPackageVersion)
|
||||
if ("19.0.0-rc-1573a96d" !== isomorphicReactPackageVersion)
|
||||
throw Error(
|
||||
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
|
||||
(isomorphicReactPackageVersion +
|
||||
"\n - react-native-renderer: 19.0.0-rc-28c9760f\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
"\n - react-native-renderer: 19.0.0-rc-1573a96d\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
);
|
||||
if (
|
||||
"function" !==
|
||||
@@ -10754,7 +10750,7 @@ var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1192 = {
|
||||
findFiberByHostInstance: getInstanceFromTag,
|
||||
bundleType: 0,
|
||||
version: "19.0.0-rc-28c9760f",
|
||||
version: "19.0.0-rc-1573a96d",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -10797,7 +10793,7 @@ var internals$jscomp$inline_1439 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-rc-28c9760f"
|
||||
reconcilerVersion: "19.0.0-rc-1573a96d"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1440 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+15
-19
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<c874312993c7138b93be21b5b2efadd0>>
|
||||
* @generated SignedSource<<6652e7dae32d5fb11c7bcc6eec0f1201>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -4298,21 +4298,22 @@ function dispatchActionState(
|
||||
throw Error("Cannot update form state while rendering.");
|
||||
fiber = actionQueue.pending;
|
||||
null === fiber
|
||||
? ((fiber = { payload: payload, next: null }),
|
||||
(fiber.next = actionQueue.pending = fiber),
|
||||
? ((payload = { payload: payload, action: actionQueue.action, next: null }),
|
||||
(payload.next = actionQueue.pending = payload),
|
||||
runActionStateAction(actionQueue, setPendingState, setState, payload))
|
||||
: (actionQueue.pending = fiber.next =
|
||||
{ payload: payload, next: fiber.next });
|
||||
{ payload: payload, action: actionQueue.action, next: fiber.next });
|
||||
}
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, payload) {
|
||||
var action = actionQueue.action,
|
||||
prevState = actionQueue.state,
|
||||
prevTransition = ReactSharedInternals.T,
|
||||
function runActionStateAction(actionQueue, setPendingState, setState, node) {
|
||||
var prevTransition = ReactSharedInternals.T,
|
||||
currentTransition = {};
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
setPendingState(!0);
|
||||
var action = node.action;
|
||||
node = node.payload;
|
||||
var prevState = actionQueue.state;
|
||||
try {
|
||||
var returnValue = action(prevState, payload),
|
||||
var returnValue = action(prevState, node),
|
||||
onStartTransitionFinish = ReactSharedInternals.S;
|
||||
null !== onStartTransitionFinish &&
|
||||
onStartTransitionFinish(currentTransition, returnValue);
|
||||
@@ -4359,12 +4360,7 @@ function finishRunningActionStateAction(
|
||||
? (actionQueue.pending = null)
|
||||
: ((first = first.next),
|
||||
(last.next = first),
|
||||
runActionStateAction(
|
||||
actionQueue,
|
||||
setPendingState,
|
||||
setState,
|
||||
first.payload
|
||||
));
|
||||
runActionStateAction(actionQueue, setPendingState, setState, first));
|
||||
}
|
||||
}
|
||||
function actionStateReducer(oldState, newState) {
|
||||
@@ -11407,11 +11403,11 @@ function traverseOwnerTreeUp(hierarchy, instance) {
|
||||
traverseOwnerTreeUp(hierarchy, instance);
|
||||
}
|
||||
var isomorphicReactPackageVersion = React.version;
|
||||
if ("19.0.0-rc-3983b44c" !== isomorphicReactPackageVersion)
|
||||
if ("19.0.0-rc-dc7a4039" !== isomorphicReactPackageVersion)
|
||||
throw Error(
|
||||
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
|
||||
(isomorphicReactPackageVersion +
|
||||
"\n - react-native-renderer: 19.0.0-rc-3983b44c\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
"\n - react-native-renderer: 19.0.0-rc-dc7a4039\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
);
|
||||
if (
|
||||
"function" !==
|
||||
@@ -11461,7 +11457,7 @@ var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1273 = {
|
||||
findFiberByHostInstance: getInstanceFromTag,
|
||||
bundleType: 0,
|
||||
version: "19.0.0-rc-3983b44c",
|
||||
version: "19.0.0-rc-dc7a4039",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -11517,7 +11513,7 @@ var roots = new Map(),
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-rc-3983b44c"
|
||||
reconcilerVersion: "19.0.0-rc-dc7a4039"
|
||||
});
|
||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
|
||||
computeComponentStackForErrorReporting: function (reactTag) {
|
||||
|
||||
Reference in New Issue
Block a user