react 19.0.0-rc-38e3b23483-20240529 → 19.0.0-rc-6d3110b4d9-20240531
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/react.development.js
CHANGED
@@ -20,7 +20,7 @@ if (
|
|
20
20
|
) {
|
21
21
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
22
22
|
}
|
23
|
-
var ReactVersion = '19.0.0-rc-
|
23
|
+
var ReactVersion = '19.0.0-rc-6d3110b4d9-20240531';
|
24
24
|
|
25
25
|
// -----------------------------------------------------------------------------
|
26
26
|
|
@@ -1365,9 +1365,16 @@ function createElement(type, config, children) {
|
|
1365
1365
|
return ReactElement(type, key, ref, undefined, undefined, getOwner(), props);
|
1366
1366
|
}
|
1367
1367
|
function cloneAndReplaceKey(oldElement, newKey) {
|
1368
|
-
|
1368
|
+
var clonedElement = ReactElement(oldElement.type, newKey, // When enableRefAsProp is on, this argument is ignored. This check only
|
1369
1369
|
// exists to avoid the `ref` access warning.
|
1370
1370
|
null , undefined, undefined, oldElement._owner, oldElement.props);
|
1371
|
+
|
1372
|
+
{
|
1373
|
+
// The cloned element should inherit the original element's key validation.
|
1374
|
+
clonedElement._store.validated = oldElement._store.validated;
|
1375
|
+
}
|
1376
|
+
|
1377
|
+
return clonedElement;
|
1371
1378
|
}
|
1372
1379
|
/**
|
1373
1380
|
* Clone and return a new ReactElement using element as the starting point.
|
@@ -1797,11 +1804,16 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
1797
1804
|
) + '/' : '') + childKey);
|
1798
1805
|
|
1799
1806
|
{
|
1800
|
-
|
1801
|
-
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1807
|
+
// If `child` was an element without a `key`, we need to validate if
|
1808
|
+
// it should have had a `key`, before assigning one to `mappedChild`.
|
1809
|
+
// $FlowFixMe[incompatible-type] Flow incorrectly thinks React.Portal doesn't have a key
|
1810
|
+
if (nameSoFar !== '' && _child != null && isValidElement(_child) && _child.key == null) {
|
1811
|
+
// We check truthiness of `child._store.validated` instead of being
|
1812
|
+
// inequal to `1` to provide a bit of backward compatibility for any
|
1813
|
+
// libraries (like `fbt`) which may be hacking this property.
|
1814
|
+
if (_child._store && !_child._store.validated) {
|
1815
|
+
// Mark this child as having failed validation, but let the actual
|
1816
|
+
// renderer print the warning later.
|
1805
1817
|
newChild._store.validated = 2;
|
1806
1818
|
}
|
1807
1819
|
}
|
@@ -2128,6 +2140,7 @@ function forwardRef(render) {
|
|
2128
2140
|
Object.defineProperty(render, 'name', {
|
2129
2141
|
value: name
|
2130
2142
|
});
|
2143
|
+
render.displayName = name;
|
2131
2144
|
}
|
2132
2145
|
}
|
2133
2146
|
});
|
@@ -2170,6 +2183,7 @@ function memo(type, compare) {
|
|
2170
2183
|
Object.defineProperty(type, 'name', {
|
2171
2184
|
value: name
|
2172
2185
|
});
|
2186
|
+
type.displayName = name;
|
2173
2187
|
}
|
2174
2188
|
}
|
2175
2189
|
});
|
package/cjs/react.production.js
CHANGED
@@ -1122,9 +1122,16 @@ function createElement(type, config, children) {
|
|
1122
1122
|
return ReactElement(type, key, ref, undefined, undefined, getOwner(), props);
|
1123
1123
|
}
|
1124
1124
|
function cloneAndReplaceKey(oldElement, newKey) {
|
1125
|
-
|
1125
|
+
var clonedElement = ReactElement(oldElement.type, newKey, // When enableRefAsProp is on, this argument is ignored. This check only
|
1126
1126
|
// exists to avoid the `ref` access warning.
|
1127
1127
|
null , undefined, undefined, oldElement._owner, oldElement.props);
|
1128
|
+
|
1129
|
+
{
|
1130
|
+
// The cloned element should inherit the original element's key validation.
|
1131
|
+
clonedElement._store.validated = oldElement._store.validated;
|
1132
|
+
}
|
1133
|
+
|
1134
|
+
return clonedElement;
|
1128
1135
|
}
|
1129
1136
|
/**
|
1130
1137
|
* Clone and return a new ReactElement using element as the starting point.
|
@@ -1554,11 +1561,16 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
1554
1561
|
) + '/' : '') + childKey);
|
1555
1562
|
|
1556
1563
|
{
|
1557
|
-
|
1558
|
-
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1564
|
+
// If `child` was an element without a `key`, we need to validate if
|
1565
|
+
// it should have had a `key`, before assigning one to `mappedChild`.
|
1566
|
+
// $FlowFixMe[incompatible-type] Flow incorrectly thinks React.Portal doesn't have a key
|
1567
|
+
if (nameSoFar !== '' && _child != null && isValidElement(_child) && _child.key == null) {
|
1568
|
+
// We check truthiness of `child._store.validated` instead of being
|
1569
|
+
// inequal to `1` to provide a bit of backward compatibility for any
|
1570
|
+
// libraries (like `fbt`) which may be hacking this property.
|
1571
|
+
if (_child._store && !_child._store.validated) {
|
1572
|
+
// Mark this child as having failed validation, but let the actual
|
1573
|
+
// renderer print the warning later.
|
1562
1574
|
newChild._store.validated = 2;
|
1563
1575
|
}
|
1564
1576
|
}
|
@@ -1829,6 +1841,7 @@ function forwardRef(render) {
|
|
1829
1841
|
Object.defineProperty(render, 'name', {
|
1830
1842
|
value: name
|
1831
1843
|
});
|
1844
|
+
render.displayName = name;
|
1832
1845
|
}
|
1833
1846
|
}
|
1834
1847
|
});
|
@@ -1948,6 +1961,7 @@ function memo(type, compare) {
|
|
1948
1961
|
Object.defineProperty(type, 'name', {
|
1949
1962
|
value: name
|
1950
1963
|
});
|
1964
|
+
type.displayName = name;
|
1951
1965
|
}
|
1952
1966
|
}
|
1953
1967
|
});
|
@@ -2138,7 +2152,7 @@ function warnAboutTransitionSubscriptions(prevTransition, currentTransition) {
|
|
2138
2152
|
|
2139
2153
|
function noop() {}
|
2140
2154
|
|
2141
|
-
var ReactVersion = '19.0.0-rc-
|
2155
|
+
var ReactVersion = '19.0.0-rc-6d3110b4d9-20240531';
|
2142
2156
|
|
2143
2157
|
var Children = {
|
2144
2158
|
map: mapChildren,
|