Skip to content

Commit

Permalink
Tweak error message for "Should have a queue" (#29626)
Browse files Browse the repository at this point in the history
DiffTrain build for commit 38e3b23.
  • Loading branch information
sophiebits committed May 29, 2024
1 parent c484123 commit 3546ca6
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b01346a616a954f7e5c6aa02b898719f>>
* @generated SignedSource<<8e7d9cc3ad79afcba96d9e66394cca14>>
*/

'use strict';
Expand Down Expand Up @@ -8005,7 +8005,7 @@ function updateReducerImpl(hook, current, reducer) {
var queue = hook.queue;

if (queue === null) {
throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');
throw new Error('Should have a queue. You are likely calling Hooks conditionally, ' + 'which is not allowed. (https://react.dev/link/invalid-hook-call)');
}

queue.lastRenderedReducer = reducer; // The last rebase update that is NOT part of the base state.
Expand Down Expand Up @@ -8240,7 +8240,7 @@ function rerenderReducer(reducer, initialArg, init) {
var queue = hook.queue;

if (queue === null) {
throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');
throw new Error('Should have a queue. You are likely calling Hooks conditionally, ' + 'which is not allowed. (https://react.dev/link/invalid-hook-call)');
}

queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous
Expand Down Expand Up @@ -23471,7 +23471,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
return root;
}

var ReactVersion = '19.0.0-rc-0d4b9126';
var ReactVersion = '19.0.0-rc-f503c54f';

/*
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b82ab7c9a033e33f8860c7aed3aa5cae>>
* @generated SignedSource<<d3304ee3b4da1d671688a845ea7bbe9c>>
*/

"use strict";
Expand Down Expand Up @@ -2537,7 +2537,7 @@ function updateReducerImpl(hook, current, reducer) {
var queue = hook.queue;
if (null === queue)
throw Error(
"Should have a queue. This is likely a bug in React. Please file an issue."
"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
);
queue.lastRenderedReducer = reducer;
var baseQueue = hook.baseQueue,
Expand Down Expand Up @@ -2646,7 +2646,7 @@ function rerenderReducer(reducer) {
queue = hook.queue;
if (null === queue)
throw Error(
"Should have a queue. This is likely a bug in React. Please file an issue."
"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
);
queue.lastRenderedReducer = reducer;
var dispatch = queue.dispatch,
Expand Down Expand Up @@ -9298,7 +9298,7 @@ var devToolsConfig$jscomp$inline_1047 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-rc-135fcf29",
version: "19.0.0-rc-0374599b",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1234 = {
Expand Down Expand Up @@ -9329,7 +9329,7 @@ var internals$jscomp$inline_1234 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-rc-135fcf29"
reconcilerVersion: "19.0.0-rc-0374599b"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1235 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b303e864c1beaa1151f860061b09a0be>>
* @generated SignedSource<<4e21c55d45573268a0b3ae3a87517a05>>
*/

"use strict";
Expand Down Expand Up @@ -2625,7 +2625,7 @@ function updateReducerImpl(hook, current, reducer) {
var queue = hook.queue;
if (null === queue)
throw Error(
"Should have a queue. This is likely a bug in React. Please file an issue."
"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
);
queue.lastRenderedReducer = reducer;
var baseQueue = hook.baseQueue,
Expand Down Expand Up @@ -2734,7 +2734,7 @@ function rerenderReducer(reducer) {
queue = hook.queue;
if (null === queue)
throw Error(
"Should have a queue. This is likely a bug in React. Please file an issue."
"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
);
queue.lastRenderedReducer = reducer;
var dispatch = queue.dispatch,
Expand Down Expand Up @@ -9920,7 +9920,7 @@ var devToolsConfig$jscomp$inline_1130 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-rc-17313e5b",
version: "19.0.0-rc-f50fffbf",
rendererPackageName: "react-test-renderer"
};
(function (internals) {
Expand Down Expand Up @@ -9964,7 +9964,7 @@ var devToolsConfig$jscomp$inline_1130 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-rc-17313e5b"
reconcilerVersion: "19.0.0-rc-f50fffbf"
});
exports._Scheduler = Scheduler;
exports.act = act;
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3b29ed16386c1afb2e76c3db0d576184154ec141
38e3b23483bf7a612391cd617a8926aa1f3cf52e
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<10cfb47da57f40f3c6d1aaf8620d48a4>>
* @generated SignedSource<<715c7ff1aa207b21918f50cdc5380bf6>>
*/

'use strict';
Expand Down Expand Up @@ -10751,7 +10751,7 @@ function updateReducerImpl(hook, current, reducer) {
var queue = hook.queue;

if (queue === null) {
throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');
throw new Error('Should have a queue. You are likely calling Hooks conditionally, ' + 'which is not allowed. (https://react.dev/link/invalid-hook-call)');
}

queue.lastRenderedReducer = reducer; // The last rebase update that is NOT part of the base state.
Expand Down Expand Up @@ -10986,7 +10986,7 @@ function rerenderReducer(reducer, initialArg, init) {
var queue = hook.queue;

if (queue === null) {
throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');
throw new Error('Should have a queue. You are likely calling Hooks conditionally, ' + 'which is not allowed. (https://react.dev/link/invalid-hook-call)');
}

queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous
Expand Down Expand Up @@ -26212,7 +26212,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
return root;
}

var ReactVersion = '19.0.0-rc-76d74f41';
var ReactVersion = '19.0.0-rc-6b65a277';

/*
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<90fa919b6a227b2cc430690a633373b6>>
* @generated SignedSource<<e220fc857a21f1b640cba2d994902482>>
*/

"use strict";
Expand Down Expand Up @@ -3915,7 +3915,7 @@ function updateReducerImpl(hook, current, reducer) {
var queue = hook.queue;
if (null === queue)
throw Error(
"Should have a queue. This is likely a bug in React. Please file an issue."
"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
);
queue.lastRenderedReducer = reducer;
var baseQueue = hook.baseQueue,
Expand Down Expand Up @@ -4024,7 +4024,7 @@ function rerenderReducer(reducer) {
queue = hook.queue;
if (null === queue)
throw Error(
"Should have a queue. This is likely a bug in React. Please file an issue."
"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
);
queue.lastRenderedReducer = reducer;
var dispatch = queue.dispatch,
Expand Down Expand Up @@ -10554,7 +10554,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1124 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-rc-515f4c11",
version: "19.0.0-rc-a1153661",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -10597,7 +10597,7 @@ var internals$jscomp$inline_1354 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-rc-515f4c11"
reconcilerVersion: "19.0.0-rc-a1153661"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1355 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<f9a5a11486f200f08e59ce3e06fc28a3>>
* @generated SignedSource<<2e682bd27fce85dbf44c7d76dad0d567>>
*/

"use strict";
Expand Down Expand Up @@ -4037,7 +4037,7 @@ function updateReducerImpl(hook, current, reducer) {
var queue = hook.queue;
if (null === queue)
throw Error(
"Should have a queue. This is likely a bug in React. Please file an issue."
"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
);
queue.lastRenderedReducer = reducer;
var baseQueue = hook.baseQueue,
Expand Down Expand Up @@ -4146,7 +4146,7 @@ function rerenderReducer(reducer) {
queue = hook.queue;
if (null === queue)
throw Error(
"Should have a queue. This is likely a bug in React. Please file an issue."
"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
);
queue.lastRenderedReducer = reducer;
var dispatch = queue.dispatch,
Expand Down Expand Up @@ -11260,7 +11260,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1205 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-rc-1abc9c11",
version: "19.0.0-rc-cefeada5",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -11316,7 +11316,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-rc-1abc9c11"
reconcilerVersion: "19.0.0-rc-cefeada5"
});
exports.createPortal = function (children, containerTag) {
return createPortal$1(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0d778c4f67b7a3562c3dae6ebc4f0c47>>
* @generated SignedSource<<fed50566df9c8a05bbdea5498a51b650>>
*/

'use strict';
Expand Down Expand Up @@ -10928,7 +10928,7 @@ function updateReducerImpl(hook, current, reducer) {
var queue = hook.queue;

if (queue === null) {
throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');
throw new Error('Should have a queue. You are likely calling Hooks conditionally, ' + 'which is not allowed. (https://react.dev/link/invalid-hook-call)');
}

queue.lastRenderedReducer = reducer; // The last rebase update that is NOT part of the base state.
Expand Down Expand Up @@ -11163,7 +11163,7 @@ function rerenderReducer(reducer, initialArg, init) {
var queue = hook.queue;

if (queue === null) {
throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');
throw new Error('Should have a queue. You are likely calling Hooks conditionally, ' + 'which is not allowed. (https://react.dev/link/invalid-hook-call)');
}

queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous
Expand Down Expand Up @@ -26562,7 +26562,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
return root;
}

var ReactVersion = '19.0.0-rc-068dfbff';
var ReactVersion = '19.0.0-rc-8955c15d';

/*
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<d07de192b2df40db5d44ec6c2d08edb2>>
* @generated SignedSource<<6f2aad6aeb6b6bb634ac7b24907148cf>>
*/

"use strict";
Expand Down Expand Up @@ -3938,7 +3938,7 @@ function updateReducerImpl(hook, current, reducer) {
var queue = hook.queue;
if (null === queue)
throw Error(
"Should have a queue. This is likely a bug in React. Please file an issue."
"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
);
queue.lastRenderedReducer = reducer;
var baseQueue = hook.baseQueue,
Expand Down Expand Up @@ -4047,7 +4047,7 @@ function rerenderReducer(reducer) {
queue = hook.queue;
if (null === queue)
throw Error(
"Should have a queue. This is likely a bug in React. Please file an issue."
"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
);
queue.lastRenderedReducer = reducer;
var dispatch = queue.dispatch,
Expand Down Expand Up @@ -10696,11 +10696,11 @@ function traverseOwnerTreeUp(hierarchy, instance) {
traverseOwnerTreeUp(hierarchy, instance);
}
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-rc-1573a96d" !== isomorphicReactPackageVersion)
if ("19.0.0-rc-2e89009b" !== 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-1573a96d\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-rc-2e89009b\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
Expand Down Expand Up @@ -10750,7 +10750,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1192 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "19.0.0-rc-1573a96d",
version: "19.0.0-rc-2e89009b",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -10793,7 +10793,7 @@ var internals$jscomp$inline_1439 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-rc-1573a96d"
reconcilerVersion: "19.0.0-rc-2e89009b"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1440 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Loading

0 comments on commit 3546ca6

Please sign in to comment.