react 19.0.0-rc-9d4fba0788-20240530 → 19.0.0-rc-9598c41a20-20240603

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.
@@ -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-9d4fba0788-20240530';
23
+ var ReactVersion = '19.0.0-rc-9598c41a20-20240603';
24
24
 
25
25
  // -----------------------------------------------------------------------------
26
26
 
@@ -1804,11 +1804,16 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
1804
1804
  ) + '/' : '') + childKey);
1805
1805
 
1806
1806
  {
1807
- if (nameSoFar !== '' && mappedChild.key == null) {
1808
- // We need to validate that this child should have had a key before assigning it one.
1809
- if (!newChild._store.validated) {
1810
- // We mark this child as having failed validation but we let the actual renderer
1811
- // print the warning later.
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.
1812
1817
  newChild._store.validated = 2;
1813
1818
  }
1814
1819
  }
@@ -2135,6 +2140,7 @@ function forwardRef(render) {
2135
2140
  Object.defineProperty(render, 'name', {
2136
2141
  value: name
2137
2142
  });
2143
+ render.displayName = name;
2138
2144
  }
2139
2145
  }
2140
2146
  });
@@ -2177,6 +2183,7 @@ function memo(type, compare) {
2177
2183
  Object.defineProperty(type, 'name', {
2178
2184
  value: name
2179
2185
  });
2186
+ type.displayName = name;
2180
2187
  }
2181
2188
  }
2182
2189
  });
@@ -536,4 +536,4 @@ exports.useSyncExternalStore = function (
536
536
  exports.useTransition = function () {
537
537
  return ReactSharedInternals.H.useTransition();
538
538
  };
539
- exports.version = "19.0.0-rc-9d4fba0788-20240530";
539
+ exports.version = "19.0.0-rc-9598c41a20-20240603";
@@ -1561,11 +1561,16 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
1561
1561
  ) + '/' : '') + childKey);
1562
1562
 
1563
1563
  {
1564
- if (nameSoFar !== '' && mappedChild.key == null) {
1565
- // We need to validate that this child should have had a key before assigning it one.
1566
- if (!newChild._store.validated) {
1567
- // We mark this child as having failed validation but we let the actual renderer
1568
- // print the warning later.
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.
1569
1574
  newChild._store.validated = 2;
1570
1575
  }
1571
1576
  }
@@ -1836,6 +1841,7 @@ function forwardRef(render) {
1836
1841
  Object.defineProperty(render, 'name', {
1837
1842
  value: name
1838
1843
  });
1844
+ render.displayName = name;
1839
1845
  }
1840
1846
  }
1841
1847
  });
@@ -1955,6 +1961,7 @@ function memo(type, compare) {
1955
1961
  Object.defineProperty(type, 'name', {
1956
1962
  value: name
1957
1963
  });
1964
+ type.displayName = name;
1958
1965
  }
1959
1966
  }
1960
1967
  });
@@ -2145,7 +2152,7 @@ function warnAboutTransitionSubscriptions(prevTransition, currentTransition) {
2145
2152
 
2146
2153
  function noop() {}
2147
2154
 
2148
- var ReactVersion = '19.0.0-rc-9d4fba0788-20240530';
2155
+ var ReactVersion = '19.0.0-rc-9598c41a20-20240603';
2149
2156
 
2150
2157
  var Children = {
2151
2158
  map: mapChildren,
@@ -476,4 +476,4 @@ exports.useId = function () {
476
476
  exports.useMemo = function (create, deps) {
477
477
  return ReactSharedInternals.H.useMemo(create, deps);
478
478
  };
479
- exports.version = "19.0.0-rc-9d4fba0788-20240530";
479
+ exports.version = "19.0.0-rc-9598c41a20-20240603";
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "keywords": [
5
5
  "react"
6
6
  ],
7
- "version": "19.0.0-rc-9d4fba0788-20240530",
7
+ "version": "19.0.0-rc-9598c41a20-20240603",
8
8
  "homepage": "https://react.dev/",
9
9
  "bugs": "https://github.com/facebook/react/issues",
10
10
  "license": "MIT",