mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Include the function name for context on invalid function child (#28362)
Also warn for symbols.
It's weird because for objects we throw a hard error but functions we do
a dev only check. Mainly because we have an object branch anyway.
In the object branch we have some built-ins that have bad errors like
forwardRef and memo but since they're going to become functions later, I
didn't bother updating those. Once they're functions those names will be
part of this.
DiffTrain build for [c1fd2a91b1](https://github.com/facebook/react/commit/c1fd2a91b1042c137d750be85e5998f699a54d2a)
This commit is contained in:
@@ -1 +1 @@
|
||||
ef72271c2d1234c9d1e1358f8083021089a50faa
|
||||
c1fd2a91b1042c137d750be85e5998f699a54d2a
|
||||
|
||||
@@ -618,4 +618,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-www-classic-863536b2";
|
||||
exports.version = "18.3.0-www-classic-3c4221fd";
|
||||
|
||||
@@ -610,4 +610,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-19268851";
|
||||
exports.version = "18.3.0-www-modern-a12e20fd";
|
||||
|
||||
@@ -66,7 +66,7 @@ if (__DEV__) {
|
||||
return self;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-162b9b5d";
|
||||
var ReactVersion = "18.3.0-www-classic-2901d413";
|
||||
|
||||
var LegacyRoot = 0;
|
||||
var ConcurrentRoot = 1;
|
||||
@@ -6285,6 +6285,7 @@ if (__DEV__) {
|
||||
var didWarnAboutStringRefs;
|
||||
var ownerHasKeyUseWarning;
|
||||
var ownerHasFunctionTypeWarning;
|
||||
var ownerHasSymbolTypeWarning;
|
||||
|
||||
var warnForMissingKey = function (child, returnFiber) {};
|
||||
|
||||
@@ -6300,6 +6301,7 @@ if (__DEV__) {
|
||||
|
||||
ownerHasKeyUseWarning = {};
|
||||
ownerHasFunctionTypeWarning = {};
|
||||
ownerHasSymbolTypeWarning = {};
|
||||
|
||||
warnForMissingKey = function (child, returnFiber) {
|
||||
if (child === null || typeof child !== "object") {
|
||||
@@ -6482,22 +6484,68 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function warnOnFunctionType(returnFiber) {
|
||||
function warnOnFunctionType(returnFiber, invalidChild) {
|
||||
{
|
||||
var componentName =
|
||||
getComponentNameFromFiber(returnFiber) || "Component";
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasFunctionTypeWarning[componentName]) {
|
||||
if (ownerHasFunctionTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasFunctionTypeWarning[componentName] = true;
|
||||
ownerHasFunctionTypeWarning[parentName] = true;
|
||||
var name = invalidChild.displayName || invalidChild.name || "Component";
|
||||
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return a Component instead of <Component /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it."
|
||||
);
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" root.render(%s)",
|
||||
name,
|
||||
name,
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" <%s>{%s}</%s>",
|
||||
name,
|
||||
name,
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function warnOnSymbolType(returnFiber, invalidChild) {
|
||||
{
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasSymbolTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasSymbolTypeWarning[parentName] = true; // eslint-disable-next-line react-internal/safe-string-coercion
|
||||
|
||||
var name = String(invalidChild);
|
||||
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " root.render(%s)",
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " <%s>%s</%s>",
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6882,7 +6930,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7000,7 +7052,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7120,7 +7176,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7875,7 +7935,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
} // Remaining cases are all treated as empty.
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ if (__DEV__) {
|
||||
return self;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-4bc0b3fd";
|
||||
var ReactVersion = "18.3.0-www-modern-827e818d";
|
||||
|
||||
var LegacyRoot = 0;
|
||||
var ConcurrentRoot = 1;
|
||||
@@ -6050,6 +6050,7 @@ if (__DEV__) {
|
||||
var didWarnAboutStringRefs;
|
||||
var ownerHasKeyUseWarning;
|
||||
var ownerHasFunctionTypeWarning;
|
||||
var ownerHasSymbolTypeWarning;
|
||||
|
||||
var warnForMissingKey = function (child, returnFiber) {};
|
||||
|
||||
@@ -6065,6 +6066,7 @@ if (__DEV__) {
|
||||
|
||||
ownerHasKeyUseWarning = {};
|
||||
ownerHasFunctionTypeWarning = {};
|
||||
ownerHasSymbolTypeWarning = {};
|
||||
|
||||
warnForMissingKey = function (child, returnFiber) {
|
||||
if (child === null || typeof child !== "object") {
|
||||
@@ -6247,22 +6249,68 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function warnOnFunctionType(returnFiber) {
|
||||
function warnOnFunctionType(returnFiber, invalidChild) {
|
||||
{
|
||||
var componentName =
|
||||
getComponentNameFromFiber(returnFiber) || "Component";
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasFunctionTypeWarning[componentName]) {
|
||||
if (ownerHasFunctionTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasFunctionTypeWarning[componentName] = true;
|
||||
ownerHasFunctionTypeWarning[parentName] = true;
|
||||
var name = invalidChild.displayName || invalidChild.name || "Component";
|
||||
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return a Component instead of <Component /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it."
|
||||
);
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" root.render(%s)",
|
||||
name,
|
||||
name,
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" <%s>{%s}</%s>",
|
||||
name,
|
||||
name,
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function warnOnSymbolType(returnFiber, invalidChild) {
|
||||
{
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasSymbolTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasSymbolTypeWarning[parentName] = true; // eslint-disable-next-line react-internal/safe-string-coercion
|
||||
|
||||
var name = String(invalidChild);
|
||||
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " root.render(%s)",
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " <%s>%s</%s>",
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6647,7 +6695,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6765,7 +6817,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6885,7 +6941,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7640,7 +7700,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
} // Remaining cases are all treated as empty.
|
||||
|
||||
|
||||
@@ -10931,6 +10931,7 @@ if (__DEV__) {
|
||||
var didWarnAboutStringRefs;
|
||||
var ownerHasKeyUseWarning;
|
||||
var ownerHasFunctionTypeWarning;
|
||||
var ownerHasSymbolTypeWarning;
|
||||
|
||||
var warnForMissingKey = function (child, returnFiber) {};
|
||||
|
||||
@@ -10946,6 +10947,7 @@ if (__DEV__) {
|
||||
|
||||
ownerHasKeyUseWarning = {};
|
||||
ownerHasFunctionTypeWarning = {};
|
||||
ownerHasSymbolTypeWarning = {};
|
||||
|
||||
warnForMissingKey = function (child, returnFiber) {
|
||||
if (child === null || typeof child !== "object") {
|
||||
@@ -11128,22 +11130,68 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function warnOnFunctionType(returnFiber) {
|
||||
function warnOnFunctionType(returnFiber, invalidChild) {
|
||||
{
|
||||
var componentName =
|
||||
getComponentNameFromFiber(returnFiber) || "Component";
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasFunctionTypeWarning[componentName]) {
|
||||
if (ownerHasFunctionTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasFunctionTypeWarning[componentName] = true;
|
||||
ownerHasFunctionTypeWarning[parentName] = true;
|
||||
var name = invalidChild.displayName || invalidChild.name || "Component";
|
||||
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return a Component instead of <Component /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it."
|
||||
);
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" root.render(%s)",
|
||||
name,
|
||||
name,
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" <%s>{%s}</%s>",
|
||||
name,
|
||||
name,
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function warnOnSymbolType(returnFiber, invalidChild) {
|
||||
{
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasSymbolTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasSymbolTypeWarning[parentName] = true; // eslint-disable-next-line react-internal/safe-string-coercion
|
||||
|
||||
var name = String(invalidChild);
|
||||
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " root.render(%s)",
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " <%s>%s</%s>",
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11528,7 +11576,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11646,7 +11698,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11766,7 +11822,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12551,7 +12611,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
} // Remaining cases are all treated as empty.
|
||||
|
||||
@@ -35836,7 +35900,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-4bb1faa4";
|
||||
var ReactVersion = "18.3.0-www-classic-c96a8652";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -10882,6 +10882,7 @@ if (__DEV__) {
|
||||
var didWarnAboutStringRefs;
|
||||
var ownerHasKeyUseWarning;
|
||||
var ownerHasFunctionTypeWarning;
|
||||
var ownerHasSymbolTypeWarning;
|
||||
|
||||
var warnForMissingKey = function (child, returnFiber) {};
|
||||
|
||||
@@ -10897,6 +10898,7 @@ if (__DEV__) {
|
||||
|
||||
ownerHasKeyUseWarning = {};
|
||||
ownerHasFunctionTypeWarning = {};
|
||||
ownerHasSymbolTypeWarning = {};
|
||||
|
||||
warnForMissingKey = function (child, returnFiber) {
|
||||
if (child === null || typeof child !== "object") {
|
||||
@@ -11079,22 +11081,68 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function warnOnFunctionType(returnFiber) {
|
||||
function warnOnFunctionType(returnFiber, invalidChild) {
|
||||
{
|
||||
var componentName =
|
||||
getComponentNameFromFiber(returnFiber) || "Component";
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasFunctionTypeWarning[componentName]) {
|
||||
if (ownerHasFunctionTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasFunctionTypeWarning[componentName] = true;
|
||||
ownerHasFunctionTypeWarning[parentName] = true;
|
||||
var name = invalidChild.displayName || invalidChild.name || "Component";
|
||||
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return a Component instead of <Component /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it."
|
||||
);
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" root.render(%s)",
|
||||
name,
|
||||
name,
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" <%s>{%s}</%s>",
|
||||
name,
|
||||
name,
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function warnOnSymbolType(returnFiber, invalidChild) {
|
||||
{
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasSymbolTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasSymbolTypeWarning[parentName] = true; // eslint-disable-next-line react-internal/safe-string-coercion
|
||||
|
||||
var name = String(invalidChild);
|
||||
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " root.render(%s)",
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " <%s>%s</%s>",
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11479,7 +11527,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11597,7 +11649,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11717,7 +11773,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12502,7 +12562,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
} // Remaining cases are all treated as empty.
|
||||
|
||||
@@ -35672,7 +35736,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-5bb6a208";
|
||||
var ReactVersion = "18.3.0-www-modern-69431358";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -17458,7 +17458,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1863 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-4bc0b3fd",
|
||||
version: "18.3.0-www-modern-827e818d",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
(function (internals) {
|
||||
@@ -17503,7 +17503,7 @@ var devToolsConfig$jscomp$inline_1863 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-modern-4bc0b3fd"
|
||||
reconcilerVersion: "18.3.0-www-modern-827e818d"
|
||||
});
|
||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
|
||||
exports.createPortal = function (children, container) {
|
||||
@@ -17761,7 +17761,7 @@ exports.useFormState = function (action, initialState, permalink) {
|
||||
exports.useFormStatus = function () {
|
||||
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-4bc0b3fd";
|
||||
exports.version = "18.3.0-www-modern-827e818d";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
@@ -19,7 +19,7 @@ if (__DEV__) {
|
||||
var React = require("react");
|
||||
var ReactDOM = require("react-dom");
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-593936b0";
|
||||
var ReactVersion = "18.3.0-www-classic-d7b5bc9a";
|
||||
|
||||
// This refers to a WWW module.
|
||||
var warningWWW = require("warning");
|
||||
@@ -12606,6 +12606,29 @@ if (__DEV__) {
|
||||
didWarnAboutMaps = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function warnOnFunctionType(invalidChild) {
|
||||
{
|
||||
var name = invalidChild.displayName || invalidChild.name || "Component";
|
||||
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.",
|
||||
name,
|
||||
name
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function warnOnSymbolType(invalidChild) {
|
||||
{
|
||||
// eslint-disable-next-line react-internal/safe-string-coercion
|
||||
var name = String(invalidChild);
|
||||
|
||||
error("Symbols are not valid as a React child.\n" + " %s", name);
|
||||
}
|
||||
} // This function by it self renders a node and consumes the task by mutating it
|
||||
// to update the current execution state.
|
||||
|
||||
@@ -12798,11 +12821,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof node === "function") {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return a Component instead of <Component /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it."
|
||||
);
|
||||
warnOnFunctionType(node);
|
||||
}
|
||||
|
||||
if (typeof node === "symbol") {
|
||||
warnOnSymbolType(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ if (__DEV__) {
|
||||
var React = require("react");
|
||||
var ReactDOM = require("react-dom");
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-320b188c";
|
||||
var ReactVersion = "18.3.0-www-modern-4fe256fb";
|
||||
|
||||
// This refers to a WWW module.
|
||||
var warningWWW = require("warning");
|
||||
@@ -12516,6 +12516,29 @@ if (__DEV__) {
|
||||
didWarnAboutMaps = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function warnOnFunctionType(invalidChild) {
|
||||
{
|
||||
var name = invalidChild.displayName || invalidChild.name || "Component";
|
||||
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.",
|
||||
name,
|
||||
name
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function warnOnSymbolType(invalidChild) {
|
||||
{
|
||||
// eslint-disable-next-line react-internal/safe-string-coercion
|
||||
var name = String(invalidChild);
|
||||
|
||||
error("Symbols are not valid as a React child.\n" + " %s", name);
|
||||
}
|
||||
} // This function by it self renders a node and consumes the task by mutating it
|
||||
// to update the current execution state.
|
||||
|
||||
@@ -12708,11 +12731,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof node === "function") {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return a Component instead of <Component /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it."
|
||||
);
|
||||
warnOnFunctionType(node);
|
||||
}
|
||||
|
||||
if (typeof node === "symbol") {
|
||||
warnOnSymbolType(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12397,6 +12397,29 @@ if (__DEV__) {
|
||||
didWarnAboutMaps = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function warnOnFunctionType(invalidChild) {
|
||||
{
|
||||
var name = invalidChild.displayName || invalidChild.name || "Component";
|
||||
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.",
|
||||
name,
|
||||
name
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function warnOnSymbolType(invalidChild) {
|
||||
{
|
||||
// eslint-disable-next-line react-internal/safe-string-coercion
|
||||
var name = String(invalidChild);
|
||||
|
||||
error("Symbols are not valid as a React child.\n" + " %s", name);
|
||||
}
|
||||
} // This function by it self renders a node and consumes the task by mutating it
|
||||
// to update the current execution state.
|
||||
|
||||
@@ -12589,11 +12612,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof node === "function") {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return a Component instead of <Component /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it."
|
||||
);
|
||||
warnOnFunctionType(node);
|
||||
}
|
||||
|
||||
if (typeof node === "symbol") {
|
||||
warnOnSymbolType(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11068,6 +11068,7 @@ if (__DEV__) {
|
||||
var didWarnAboutStringRefs;
|
||||
var ownerHasKeyUseWarning;
|
||||
var ownerHasFunctionTypeWarning;
|
||||
var ownerHasSymbolTypeWarning;
|
||||
|
||||
var warnForMissingKey = function (child, returnFiber) {};
|
||||
|
||||
@@ -11083,6 +11084,7 @@ if (__DEV__) {
|
||||
|
||||
ownerHasKeyUseWarning = {};
|
||||
ownerHasFunctionTypeWarning = {};
|
||||
ownerHasSymbolTypeWarning = {};
|
||||
|
||||
warnForMissingKey = function (child, returnFiber) {
|
||||
if (child === null || typeof child !== "object") {
|
||||
@@ -11265,22 +11267,68 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function warnOnFunctionType(returnFiber) {
|
||||
function warnOnFunctionType(returnFiber, invalidChild) {
|
||||
{
|
||||
var componentName =
|
||||
getComponentNameFromFiber(returnFiber) || "Component";
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasFunctionTypeWarning[componentName]) {
|
||||
if (ownerHasFunctionTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasFunctionTypeWarning[componentName] = true;
|
||||
ownerHasFunctionTypeWarning[parentName] = true;
|
||||
var name = invalidChild.displayName || invalidChild.name || "Component";
|
||||
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return a Component instead of <Component /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it."
|
||||
);
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" root.render(%s)",
|
||||
name,
|
||||
name,
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" <%s>{%s}</%s>",
|
||||
name,
|
||||
name,
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function warnOnSymbolType(returnFiber, invalidChild) {
|
||||
{
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasSymbolTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasSymbolTypeWarning[parentName] = true; // eslint-disable-next-line react-internal/safe-string-coercion
|
||||
|
||||
var name = String(invalidChild);
|
||||
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " root.render(%s)",
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " <%s>%s</%s>",
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11665,7 +11713,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11783,7 +11835,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11903,7 +11959,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12688,7 +12748,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
} // Remaining cases are all treated as empty.
|
||||
|
||||
@@ -36460,7 +36524,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-863536b2";
|
||||
var ReactVersion = "18.3.0-www-classic-3c4221fd";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -11019,6 +11019,7 @@ if (__DEV__) {
|
||||
var didWarnAboutStringRefs;
|
||||
var ownerHasKeyUseWarning;
|
||||
var ownerHasFunctionTypeWarning;
|
||||
var ownerHasSymbolTypeWarning;
|
||||
|
||||
var warnForMissingKey = function (child, returnFiber) {};
|
||||
|
||||
@@ -11034,6 +11035,7 @@ if (__DEV__) {
|
||||
|
||||
ownerHasKeyUseWarning = {};
|
||||
ownerHasFunctionTypeWarning = {};
|
||||
ownerHasSymbolTypeWarning = {};
|
||||
|
||||
warnForMissingKey = function (child, returnFiber) {
|
||||
if (child === null || typeof child !== "object") {
|
||||
@@ -11216,22 +11218,68 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function warnOnFunctionType(returnFiber) {
|
||||
function warnOnFunctionType(returnFiber, invalidChild) {
|
||||
{
|
||||
var componentName =
|
||||
getComponentNameFromFiber(returnFiber) || "Component";
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasFunctionTypeWarning[componentName]) {
|
||||
if (ownerHasFunctionTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasFunctionTypeWarning[componentName] = true;
|
||||
ownerHasFunctionTypeWarning[parentName] = true;
|
||||
var name = invalidChild.displayName || invalidChild.name || "Component";
|
||||
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return a Component instead of <Component /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it."
|
||||
);
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" root.render(%s)",
|
||||
name,
|
||||
name,
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" <%s>{%s}</%s>",
|
||||
name,
|
||||
name,
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function warnOnSymbolType(returnFiber, invalidChild) {
|
||||
{
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasSymbolTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasSymbolTypeWarning[parentName] = true; // eslint-disable-next-line react-internal/safe-string-coercion
|
||||
|
||||
var name = String(invalidChild);
|
||||
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " root.render(%s)",
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " <%s>%s</%s>",
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11616,7 +11664,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11734,7 +11786,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11854,7 +11910,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12639,7 +12699,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
} // Remaining cases are all treated as empty.
|
||||
|
||||
@@ -36296,7 +36360,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-617357dc";
|
||||
var ReactVersion = "18.3.0-www-modern-591385be";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -5216,6 +5216,7 @@ if (__DEV__) {
|
||||
var didWarnAboutStringRefs;
|
||||
var ownerHasKeyUseWarning;
|
||||
var ownerHasFunctionTypeWarning;
|
||||
var ownerHasSymbolTypeWarning;
|
||||
|
||||
var warnForMissingKey = function (child, returnFiber) {};
|
||||
|
||||
@@ -5231,6 +5232,7 @@ if (__DEV__) {
|
||||
|
||||
ownerHasKeyUseWarning = {};
|
||||
ownerHasFunctionTypeWarning = {};
|
||||
ownerHasSymbolTypeWarning = {};
|
||||
|
||||
warnForMissingKey = function (child, returnFiber) {
|
||||
if (child === null || typeof child !== "object") {
|
||||
@@ -5413,22 +5415,68 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function warnOnFunctionType(returnFiber) {
|
||||
function warnOnFunctionType(returnFiber, invalidChild) {
|
||||
{
|
||||
var componentName =
|
||||
getComponentNameFromFiber(returnFiber) || "Component";
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasFunctionTypeWarning[componentName]) {
|
||||
if (ownerHasFunctionTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasFunctionTypeWarning[componentName] = true;
|
||||
ownerHasFunctionTypeWarning[parentName] = true;
|
||||
var name = invalidChild.displayName || invalidChild.name || "Component";
|
||||
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return a Component instead of <Component /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it."
|
||||
);
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" root.render(%s)",
|
||||
name,
|
||||
name,
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" <%s>{%s}</%s>",
|
||||
name,
|
||||
name,
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function warnOnSymbolType(returnFiber, invalidChild) {
|
||||
{
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasSymbolTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasSymbolTypeWarning[parentName] = true; // eslint-disable-next-line react-internal/safe-string-coercion
|
||||
|
||||
var name = String(invalidChild);
|
||||
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " root.render(%s)",
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " <%s>%s</%s>",
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5813,7 +5861,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5931,7 +5983,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6051,7 +6107,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6806,7 +6866,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
} // Remaining cases are all treated as empty.
|
||||
|
||||
@@ -26003,7 +26067,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-bee0ea24";
|
||||
var ReactVersion = "18.3.0-www-classic-cfa64f96";
|
||||
|
||||
// Might add PROFILE later.
|
||||
|
||||
|
||||
@@ -5216,6 +5216,7 @@ if (__DEV__) {
|
||||
var didWarnAboutStringRefs;
|
||||
var ownerHasKeyUseWarning;
|
||||
var ownerHasFunctionTypeWarning;
|
||||
var ownerHasSymbolTypeWarning;
|
||||
|
||||
var warnForMissingKey = function (child, returnFiber) {};
|
||||
|
||||
@@ -5231,6 +5232,7 @@ if (__DEV__) {
|
||||
|
||||
ownerHasKeyUseWarning = {};
|
||||
ownerHasFunctionTypeWarning = {};
|
||||
ownerHasSymbolTypeWarning = {};
|
||||
|
||||
warnForMissingKey = function (child, returnFiber) {
|
||||
if (child === null || typeof child !== "object") {
|
||||
@@ -5413,22 +5415,68 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function warnOnFunctionType(returnFiber) {
|
||||
function warnOnFunctionType(returnFiber, invalidChild) {
|
||||
{
|
||||
var componentName =
|
||||
getComponentNameFromFiber(returnFiber) || "Component";
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasFunctionTypeWarning[componentName]) {
|
||||
if (ownerHasFunctionTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasFunctionTypeWarning[componentName] = true;
|
||||
ownerHasFunctionTypeWarning[parentName] = true;
|
||||
var name = invalidChild.displayName || invalidChild.name || "Component";
|
||||
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return a Component instead of <Component /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it."
|
||||
);
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" root.render(%s)",
|
||||
name,
|
||||
name,
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Functions are not valid as a React child. This may happen if " +
|
||||
"you return %s instead of <%s /> from render. " +
|
||||
"Or maybe you meant to call this function rather than return it.\n" +
|
||||
" <%s>{%s}</%s>",
|
||||
name,
|
||||
name,
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function warnOnSymbolType(returnFiber, invalidChild) {
|
||||
{
|
||||
var parentName = getComponentNameFromFiber(returnFiber) || "Component";
|
||||
|
||||
if (ownerHasSymbolTypeWarning[parentName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
ownerHasSymbolTypeWarning[parentName] = true; // eslint-disable-next-line react-internal/safe-string-coercion
|
||||
|
||||
var name = String(invalidChild);
|
||||
|
||||
if (returnFiber.tag === HostRoot) {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " root.render(%s)",
|
||||
name
|
||||
);
|
||||
} else {
|
||||
error(
|
||||
"Symbols are not valid as a React child.\n" + " <%s>%s</%s>",
|
||||
parentName,
|
||||
name,
|
||||
parentName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5813,7 +5861,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5931,7 +5983,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6051,7 +6107,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6806,7 +6866,11 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
if (typeof newChild === "function") {
|
||||
warnOnFunctionType(returnFiber);
|
||||
warnOnFunctionType(returnFiber, newChild);
|
||||
}
|
||||
|
||||
if (typeof newChild === "symbol") {
|
||||
warnOnSymbolType(returnFiber, newChild);
|
||||
}
|
||||
} // Remaining cases are all treated as empty.
|
||||
|
||||
@@ -26003,7 +26067,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-ba994a16";
|
||||
var ReactVersion = "18.3.0-www-modern-5300fd2b";
|
||||
|
||||
// Might add PROFILE later.
|
||||
|
||||
|
||||
@@ -178,7 +178,9 @@ export default [
|
||||
"Failed %s type: %s",
|
||||
"Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",
|
||||
"Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",
|
||||
"Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.",
|
||||
"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.",
|
||||
"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n <%s>{%s}</%s>",
|
||||
"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n root.render(%s)",
|
||||
"Internal React Error: React expected bootstrap script or module with src \"%s\" to not have been preloaded already. please file an issue",
|
||||
"Internal React error: A listener was unexpectedly attached to a \"noop\" thenable. This is a bug in React. Please file an issue.",
|
||||
"Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.\n\nError message:\n\n%s",
|
||||
@@ -273,6 +275,9 @@ export default [
|
||||
"Should have found matching lanes. This is a bug in React.",
|
||||
"State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().",
|
||||
"Style property values shouldn't contain a semicolon. Try \"%s: %s\" instead.",
|
||||
"Symbols are not valid as a React child.\n %s",
|
||||
"Symbols are not valid as a React child.\n <%s>%s</%s>",
|
||||
"Symbols are not valid as a React child.\n root.render(%s)",
|
||||
"Text content did not match. Server: \"%s\" Client: \"%s\"",
|
||||
"Text strings must be rendered within a <Text> component.",
|
||||
"Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",
|
||||
|
||||
Reference in New Issue
Block a user