react 18.3.0-next-189f70e17-20230216 → 18.3.0-next-ca2cf319f-20230223
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/react-jsx-dev-runtime.development.js +37 -37
- package/cjs/react-jsx-runtime.development.js +35 -35
- package/cjs/react.development.js +50 -50
- package/cjs/react.production.min.js +16 -16
- package/cjs/react.shared-subset.development.js +49 -49
- package/cjs/react.shared-subset.production.min.js +11 -11
- package/package.json +1 -1
- package/umd/react.development.js +65 -81
- package/umd/react.production.min.js +24 -24
- package/umd/react.profiling.min.js +24 -24
@@ -102,7 +102,7 @@ var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in
|
|
102
102
|
|
103
103
|
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
104
104
|
|
105
|
-
var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference');
|
105
|
+
var REACT_CLIENT_REFERENCE$1 = Symbol.for('react.client.reference');
|
106
106
|
function isValidElementType(type) {
|
107
107
|
if (typeof type === 'string' || typeof type === 'function') {
|
108
108
|
return true;
|
@@ -118,7 +118,7 @@ function isValidElementType(type) {
|
|
118
118
|
// types supported by any Flight configuration anywhere since
|
119
119
|
// we don't know which Flight build this will end up being used
|
120
120
|
// with.
|
121
|
-
type.$$typeof === REACT_CLIENT_REFERENCE || type.getModuleId !== undefined) {
|
121
|
+
type.$$typeof === REACT_CLIENT_REFERENCE$1 || type.getModuleId !== undefined) {
|
122
122
|
return true;
|
123
123
|
}
|
124
124
|
}
|
@@ -361,7 +361,7 @@ var componentFrameCache;
|
|
361
361
|
|
362
362
|
function describeNativeComponentFrame(fn, construct) {
|
363
363
|
// If something asked for a stack inside a fake render, it should get ignored.
|
364
|
-
if (
|
364
|
+
if (!fn || reentry) {
|
365
365
|
return '';
|
366
366
|
}
|
367
367
|
|
@@ -587,16 +587,16 @@ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
587
587
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
588
588
|
|
589
589
|
var loggedTypeFailures = {};
|
590
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
590
|
+
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
591
591
|
|
592
|
-
function setCurrentlyValidatingElement(element) {
|
592
|
+
function setCurrentlyValidatingElement$1(element) {
|
593
593
|
{
|
594
594
|
if (element) {
|
595
595
|
var owner = element._owner;
|
596
596
|
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
597
|
-
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
597
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
598
598
|
} else {
|
599
|
-
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
599
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
600
600
|
}
|
601
601
|
}
|
602
602
|
}
|
@@ -628,22 +628,22 @@ function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
628
628
|
}
|
629
629
|
|
630
630
|
if (error$1 && !(error$1 instanceof Error)) {
|
631
|
-
setCurrentlyValidatingElement(element);
|
631
|
+
setCurrentlyValidatingElement$1(element);
|
632
632
|
|
633
633
|
error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
|
634
634
|
|
635
|
-
setCurrentlyValidatingElement(null);
|
635
|
+
setCurrentlyValidatingElement$1(null);
|
636
636
|
}
|
637
637
|
|
638
638
|
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
639
639
|
// Only monitor this failure once because there tends to be a lot of the
|
640
640
|
// same error.
|
641
641
|
loggedTypeFailures[error$1.message] = true;
|
642
|
-
setCurrentlyValidatingElement(element);
|
642
|
+
setCurrentlyValidatingElement$1(element);
|
643
643
|
|
644
644
|
error('Failed %s type: %s', location, error$1.message);
|
645
645
|
|
646
|
-
setCurrentlyValidatingElement(null);
|
646
|
+
setCurrentlyValidatingElement$1(null);
|
647
647
|
}
|
648
648
|
}
|
649
649
|
}
|
@@ -724,7 +724,7 @@ function checkKeyStringCoercion(value) {
|
|
724
724
|
}
|
725
725
|
}
|
726
726
|
|
727
|
-
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
727
|
+
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
728
728
|
var RESERVED_PROPS = {
|
729
729
|
key: true,
|
730
730
|
ref: true,
|
@@ -769,11 +769,11 @@ function hasValidKey(config) {
|
|
769
769
|
|
770
770
|
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
771
771
|
{
|
772
|
-
if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
|
773
|
-
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
772
|
+
if (typeof config.ref === 'string' && ReactCurrentOwner$1.current && self && ReactCurrentOwner$1.current.stateNode !== self) {
|
773
|
+
var componentName = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
774
774
|
|
775
775
|
if (!didWarnAboutStringRefs[componentName]) {
|
776
|
-
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
|
776
|
+
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner$1.current.type), config.ref);
|
777
777
|
|
778
778
|
didWarnAboutStringRefs[componentName] = true;
|
779
779
|
}
|
@@ -898,7 +898,7 @@ var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
898
898
|
* @param {string} key
|
899
899
|
*/
|
900
900
|
|
901
|
-
function jsxDEV(type, config, maybeKey, source, self) {
|
901
|
+
function jsxDEV$1(type, config, maybeKey, source, self) {
|
902
902
|
{
|
903
903
|
var propName; // Reserved names are extracted
|
904
904
|
|
@@ -962,22 +962,22 @@ function jsxDEV(type, config, maybeKey, source, self) {
|
|
962
962
|
}
|
963
963
|
}
|
964
964
|
|
965
|
-
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
965
|
+
return ReactElement(type, key, ref, self, source, ReactCurrentOwner$1.current, props);
|
966
966
|
}
|
967
967
|
}
|
968
968
|
|
969
|
-
var ReactCurrentOwner
|
970
|
-
var ReactDebugCurrentFrame
|
971
|
-
var REACT_CLIENT_REFERENCE
|
969
|
+
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
970
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
971
|
+
var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference');
|
972
972
|
|
973
|
-
function setCurrentlyValidatingElement
|
973
|
+
function setCurrentlyValidatingElement(element) {
|
974
974
|
{
|
975
975
|
if (element) {
|
976
976
|
var owner = element._owner;
|
977
977
|
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
978
|
-
ReactDebugCurrentFrame
|
978
|
+
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
979
979
|
} else {
|
980
|
-
ReactDebugCurrentFrame
|
980
|
+
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
981
981
|
}
|
982
982
|
}
|
983
983
|
}
|
@@ -1004,8 +1004,8 @@ function isValidElement(object) {
|
|
1004
1004
|
|
1005
1005
|
function getDeclarationErrorAddendum() {
|
1006
1006
|
{
|
1007
|
-
if (ReactCurrentOwner
|
1008
|
-
var name = getComponentNameFromType(ReactCurrentOwner
|
1007
|
+
if (ReactCurrentOwner.current) {
|
1008
|
+
var name = getComponentNameFromType(ReactCurrentOwner.current.type);
|
1009
1009
|
|
1010
1010
|
if (name) {
|
1011
1011
|
return '\n\nCheck the render method of `' + name + '`.';
|
@@ -1083,16 +1083,16 @@ function validateExplicitKey(element, parentType) {
|
|
1083
1083
|
|
1084
1084
|
var childOwner = '';
|
1085
1085
|
|
1086
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner
|
1086
|
+
if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
1087
1087
|
// Give the component that originally created this child.
|
1088
1088
|
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
1089
1089
|
}
|
1090
1090
|
|
1091
|
-
setCurrentlyValidatingElement
|
1091
|
+
setCurrentlyValidatingElement(element);
|
1092
1092
|
|
1093
1093
|
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
1094
1094
|
|
1095
|
-
setCurrentlyValidatingElement
|
1095
|
+
setCurrentlyValidatingElement(null);
|
1096
1096
|
}
|
1097
1097
|
}
|
1098
1098
|
/**
|
@@ -1112,7 +1112,7 @@ function validateChildKeys(node, parentType) {
|
|
1112
1112
|
return;
|
1113
1113
|
}
|
1114
1114
|
|
1115
|
-
if (node.$$typeof === REACT_CLIENT_REFERENCE
|
1115
|
+
if (node.$$typeof === REACT_CLIENT_REFERENCE) ; else if (isArray(node)) {
|
1116
1116
|
for (var i = 0; i < node.length; i++) {
|
1117
1117
|
var child = node[i];
|
1118
1118
|
|
@@ -1161,7 +1161,7 @@ function validatePropTypes(element) {
|
|
1161
1161
|
return;
|
1162
1162
|
}
|
1163
1163
|
|
1164
|
-
if (type.$$typeof === REACT_CLIENT_REFERENCE
|
1164
|
+
if (type.$$typeof === REACT_CLIENT_REFERENCE) {
|
1165
1165
|
return;
|
1166
1166
|
}
|
1167
1167
|
|
@@ -1208,21 +1208,21 @@ function validateFragmentProps(fragment) {
|
|
1208
1208
|
var key = keys[i];
|
1209
1209
|
|
1210
1210
|
if (key !== 'children' && key !== 'key') {
|
1211
|
-
setCurrentlyValidatingElement
|
1211
|
+
setCurrentlyValidatingElement(fragment);
|
1212
1212
|
|
1213
1213
|
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
1214
1214
|
|
1215
|
-
setCurrentlyValidatingElement
|
1215
|
+
setCurrentlyValidatingElement(null);
|
1216
1216
|
break;
|
1217
1217
|
}
|
1218
1218
|
}
|
1219
1219
|
|
1220
1220
|
if (fragment.ref !== null) {
|
1221
|
-
setCurrentlyValidatingElement
|
1221
|
+
setCurrentlyValidatingElement(fragment);
|
1222
1222
|
|
1223
1223
|
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
1224
1224
|
|
1225
|
-
setCurrentlyValidatingElement
|
1225
|
+
setCurrentlyValidatingElement(null);
|
1226
1226
|
}
|
1227
1227
|
}
|
1228
1228
|
}
|
@@ -1264,7 +1264,7 @@ function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
1264
1264
|
error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
|
1265
1265
|
}
|
1266
1266
|
|
1267
|
-
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
|
1267
|
+
var element = jsxDEV$1(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
|
1268
1268
|
// TODO: Drop this when these are no longer allowed as the type argument.
|
1269
1269
|
|
1270
1270
|
if (element == null) {
|
@@ -1324,9 +1324,9 @@ function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
1324
1324
|
}
|
1325
1325
|
} // These two functions exist to still get child warnings in dev
|
1326
1326
|
|
1327
|
-
var jsxDEV
|
1327
|
+
var jsxDEV = jsxWithValidation ;
|
1328
1328
|
|
1329
1329
|
exports.Fragment = REACT_FRAGMENT_TYPE;
|
1330
|
-
exports.jsxDEV = jsxDEV
|
1330
|
+
exports.jsxDEV = jsxDEV;
|
1331
1331
|
})();
|
1332
1332
|
}
|
@@ -102,7 +102,7 @@ var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in
|
|
102
102
|
|
103
103
|
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
104
104
|
|
105
|
-
var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference');
|
105
|
+
var REACT_CLIENT_REFERENCE$1 = Symbol.for('react.client.reference');
|
106
106
|
function isValidElementType(type) {
|
107
107
|
if (typeof type === 'string' || typeof type === 'function') {
|
108
108
|
return true;
|
@@ -118,7 +118,7 @@ function isValidElementType(type) {
|
|
118
118
|
// types supported by any Flight configuration anywhere since
|
119
119
|
// we don't know which Flight build this will end up being used
|
120
120
|
// with.
|
121
|
-
type.$$typeof === REACT_CLIENT_REFERENCE || type.getModuleId !== undefined) {
|
121
|
+
type.$$typeof === REACT_CLIENT_REFERENCE$1 || type.getModuleId !== undefined) {
|
122
122
|
return true;
|
123
123
|
}
|
124
124
|
}
|
@@ -361,7 +361,7 @@ var componentFrameCache;
|
|
361
361
|
|
362
362
|
function describeNativeComponentFrame(fn, construct) {
|
363
363
|
// If something asked for a stack inside a fake render, it should get ignored.
|
364
|
-
if (
|
364
|
+
if (!fn || reentry) {
|
365
365
|
return '';
|
366
366
|
}
|
367
367
|
|
@@ -587,16 +587,16 @@ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
587
587
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
588
588
|
|
589
589
|
var loggedTypeFailures = {};
|
590
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
590
|
+
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
591
591
|
|
592
|
-
function setCurrentlyValidatingElement(element) {
|
592
|
+
function setCurrentlyValidatingElement$1(element) {
|
593
593
|
{
|
594
594
|
if (element) {
|
595
595
|
var owner = element._owner;
|
596
596
|
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
597
|
-
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
597
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
598
598
|
} else {
|
599
|
-
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
599
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
600
600
|
}
|
601
601
|
}
|
602
602
|
}
|
@@ -628,22 +628,22 @@ function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
628
628
|
}
|
629
629
|
|
630
630
|
if (error$1 && !(error$1 instanceof Error)) {
|
631
|
-
setCurrentlyValidatingElement(element);
|
631
|
+
setCurrentlyValidatingElement$1(element);
|
632
632
|
|
633
633
|
error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
|
634
634
|
|
635
|
-
setCurrentlyValidatingElement(null);
|
635
|
+
setCurrentlyValidatingElement$1(null);
|
636
636
|
}
|
637
637
|
|
638
638
|
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
639
639
|
// Only monitor this failure once because there tends to be a lot of the
|
640
640
|
// same error.
|
641
641
|
loggedTypeFailures[error$1.message] = true;
|
642
|
-
setCurrentlyValidatingElement(element);
|
642
|
+
setCurrentlyValidatingElement$1(element);
|
643
643
|
|
644
644
|
error('Failed %s type: %s', location, error$1.message);
|
645
645
|
|
646
|
-
setCurrentlyValidatingElement(null);
|
646
|
+
setCurrentlyValidatingElement$1(null);
|
647
647
|
}
|
648
648
|
}
|
649
649
|
}
|
@@ -724,7 +724,7 @@ function checkKeyStringCoercion(value) {
|
|
724
724
|
}
|
725
725
|
}
|
726
726
|
|
727
|
-
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
727
|
+
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
728
728
|
var RESERVED_PROPS = {
|
729
729
|
key: true,
|
730
730
|
ref: true,
|
@@ -769,11 +769,11 @@ function hasValidKey(config) {
|
|
769
769
|
|
770
770
|
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
771
771
|
{
|
772
|
-
if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
|
773
|
-
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
772
|
+
if (typeof config.ref === 'string' && ReactCurrentOwner$1.current && self && ReactCurrentOwner$1.current.stateNode !== self) {
|
773
|
+
var componentName = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
774
774
|
|
775
775
|
if (!didWarnAboutStringRefs[componentName]) {
|
776
|
-
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
|
776
|
+
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner$1.current.type), config.ref);
|
777
777
|
|
778
778
|
didWarnAboutStringRefs[componentName] = true;
|
779
779
|
}
|
@@ -962,22 +962,22 @@ function jsxDEV(type, config, maybeKey, source, self) {
|
|
962
962
|
}
|
963
963
|
}
|
964
964
|
|
965
|
-
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
965
|
+
return ReactElement(type, key, ref, self, source, ReactCurrentOwner$1.current, props);
|
966
966
|
}
|
967
967
|
}
|
968
968
|
|
969
|
-
var ReactCurrentOwner
|
970
|
-
var ReactDebugCurrentFrame
|
971
|
-
var REACT_CLIENT_REFERENCE
|
969
|
+
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
970
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
971
|
+
var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference');
|
972
972
|
|
973
|
-
function setCurrentlyValidatingElement
|
973
|
+
function setCurrentlyValidatingElement(element) {
|
974
974
|
{
|
975
975
|
if (element) {
|
976
976
|
var owner = element._owner;
|
977
977
|
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
978
|
-
ReactDebugCurrentFrame
|
978
|
+
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
979
979
|
} else {
|
980
|
-
ReactDebugCurrentFrame
|
980
|
+
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
981
981
|
}
|
982
982
|
}
|
983
983
|
}
|
@@ -1004,8 +1004,8 @@ function isValidElement(object) {
|
|
1004
1004
|
|
1005
1005
|
function getDeclarationErrorAddendum() {
|
1006
1006
|
{
|
1007
|
-
if (ReactCurrentOwner
|
1008
|
-
var name = getComponentNameFromType(ReactCurrentOwner
|
1007
|
+
if (ReactCurrentOwner.current) {
|
1008
|
+
var name = getComponentNameFromType(ReactCurrentOwner.current.type);
|
1009
1009
|
|
1010
1010
|
if (name) {
|
1011
1011
|
return '\n\nCheck the render method of `' + name + '`.';
|
@@ -1083,16 +1083,16 @@ function validateExplicitKey(element, parentType) {
|
|
1083
1083
|
|
1084
1084
|
var childOwner = '';
|
1085
1085
|
|
1086
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner
|
1086
|
+
if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
1087
1087
|
// Give the component that originally created this child.
|
1088
1088
|
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
1089
1089
|
}
|
1090
1090
|
|
1091
|
-
setCurrentlyValidatingElement
|
1091
|
+
setCurrentlyValidatingElement(element);
|
1092
1092
|
|
1093
1093
|
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
1094
1094
|
|
1095
|
-
setCurrentlyValidatingElement
|
1095
|
+
setCurrentlyValidatingElement(null);
|
1096
1096
|
}
|
1097
1097
|
}
|
1098
1098
|
/**
|
@@ -1112,7 +1112,7 @@ function validateChildKeys(node, parentType) {
|
|
1112
1112
|
return;
|
1113
1113
|
}
|
1114
1114
|
|
1115
|
-
if (node.$$typeof === REACT_CLIENT_REFERENCE
|
1115
|
+
if (node.$$typeof === REACT_CLIENT_REFERENCE) ; else if (isArray(node)) {
|
1116
1116
|
for (var i = 0; i < node.length; i++) {
|
1117
1117
|
var child = node[i];
|
1118
1118
|
|
@@ -1161,7 +1161,7 @@ function validatePropTypes(element) {
|
|
1161
1161
|
return;
|
1162
1162
|
}
|
1163
1163
|
|
1164
|
-
if (type.$$typeof === REACT_CLIENT_REFERENCE
|
1164
|
+
if (type.$$typeof === REACT_CLIENT_REFERENCE) {
|
1165
1165
|
return;
|
1166
1166
|
}
|
1167
1167
|
|
@@ -1208,21 +1208,21 @@ function validateFragmentProps(fragment) {
|
|
1208
1208
|
var key = keys[i];
|
1209
1209
|
|
1210
1210
|
if (key !== 'children' && key !== 'key') {
|
1211
|
-
setCurrentlyValidatingElement
|
1211
|
+
setCurrentlyValidatingElement(fragment);
|
1212
1212
|
|
1213
1213
|
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
1214
1214
|
|
1215
|
-
setCurrentlyValidatingElement
|
1215
|
+
setCurrentlyValidatingElement(null);
|
1216
1216
|
break;
|
1217
1217
|
}
|
1218
1218
|
}
|
1219
1219
|
|
1220
1220
|
if (fragment.ref !== null) {
|
1221
|
-
setCurrentlyValidatingElement
|
1221
|
+
setCurrentlyValidatingElement(fragment);
|
1222
1222
|
|
1223
1223
|
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
1224
1224
|
|
1225
|
-
setCurrentlyValidatingElement
|
1225
|
+
setCurrentlyValidatingElement(null);
|
1226
1226
|
}
|
1227
1227
|
}
|
1228
1228
|
}
|
@@ -1338,10 +1338,10 @@ function jsxWithValidationDynamic(type, props, key) {
|
|
1338
1338
|
}
|
1339
1339
|
}
|
1340
1340
|
|
1341
|
-
var jsx =
|
1341
|
+
var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
|
1342
1342
|
// for now we can ship identical prod functions
|
1343
1343
|
|
1344
|
-
var jsxs =
|
1344
|
+
var jsxs = jsxWithValidationStatic ;
|
1345
1345
|
|
1346
1346
|
exports.Fragment = REACT_FRAGMENT_TYPE;
|
1347
1347
|
exports.jsx = jsx;
|