Skip to content

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Aug 12, 2025

We previously encountered these errors with MDX. The newest issue was a lodash.cloneDeep(objWithReactElements).

Example:

Attempted to render <span key="upsell"> without development properties. This is not supported. It can happen if:
- The element is created with a production version of React but rendered in development.
- The element was cloned with a custom function instead of `React.cloneElement`.
The props of this element may help locate this element: { children: 'Free!' }

@meta-cla meta-cla bot added the CLA Signed label Aug 12, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Aug 12, 2025
'Attempted to render <span key="one"> without development properties. This is not supported. It can happen if:' +
'\n- The element is created with a production version of React but rendered in development.' +
'\n- The element was cloned with a custom function instead of `React.cloneElement`.\n' +
"The props of this element may help locate this element: { children: 'Free!', [key]: [Getter] }",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the prettiest to include the legacy key getter but it gets the job done.

key = ' key="' + element.key + '"';
}

console.error(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually don't do conditional throws but maybe this here is a valid exception since we'll throw later anyway in dev when accessing .stack?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might fix that to not throw though and then it would become unbalanced.

@react-sizebot
Copy link

Comparing: 0422a00...1d30067

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB +0.11% 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 530.16 kB 530.16 kB = 93.39 kB 93.39 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 654.53 kB 654.53 kB = 115.11 kB 115.11 kB
facebook-www/ReactDOM-prod.classic.js = 674.30 kB 674.30 kB = 118.29 kB 118.29 kB
facebook-www/ReactDOM-prod.modern.js = 664.73 kB 664.73 kB = 116.64 kB 116.64 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable-semver/react-server/cjs/react-server-flight.development.js +0.58% 134.90 kB 135.68 kB +0.82% 24.27 kB 24.46 kB
oss-stable/react-server/cjs/react-server-flight.development.js +0.58% 134.90 kB 135.68 kB +0.82% 24.27 kB 24.46 kB
oss-experimental/react-server/cjs/react-server-flight.development.js +0.55% 142.43 kB 143.21 kB +0.75% 25.49 kB 25.68 kB
test_utils/ReactAllWarnings.js +0.51% 66.57 kB 66.91 kB +0.64% 16.72 kB 16.82 kB
oss-stable-semver/react-server-dom-parcel/cjs/react-server-dom-parcel-server.browser.development.js +0.45% 174.88 kB 175.66 kB +0.61% 31.94 kB 32.14 kB
oss-stable/react-server-dom-parcel/cjs/react-server-dom-parcel-server.browser.development.js +0.45% 174.88 kB 175.66 kB +0.61% 31.94 kB 32.14 kB
oss-stable-semver/react-server-dom-parcel/cjs/react-server-dom-parcel-server.edge.development.js +0.44% 178.61 kB 179.39 kB +0.63% 32.42 kB 32.63 kB
oss-stable/react-server-dom-parcel/cjs/react-server-dom-parcel-server.edge.development.js +0.44% 178.61 kB 179.39 kB +0.63% 32.42 kB 32.63 kB
oss-experimental/react-server-dom-parcel/cjs/react-server-dom-parcel-server.browser.development.js +0.43% 182.42 kB 183.20 kB +0.56% 33.12 kB 33.31 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js +0.43% 182.62 kB 183.40 kB +0.60% 33.24 kB 33.44 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js +0.43% 182.62 kB 183.40 kB +0.60% 33.24 kB 33.44 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +0.43% 183.20 kB 183.98 kB +0.60% 33.36 kB 33.56 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +0.43% 183.20 kB 183.98 kB +0.60% 33.36 kB 33.56 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js +0.42% 186.38 kB 187.16 kB +0.59% 33.74 kB 33.94 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js +0.42% 186.38 kB 187.16 kB +0.59% 33.74 kB 33.94 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +0.42% 186.49 kB 187.27 kB +0.59% 33.75 kB 33.95 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +0.42% 186.49 kB 187.27 kB +0.59% 33.75 kB 33.95 kB
oss-experimental/react-server-dom-parcel/cjs/react-server-dom-parcel-server.edge.development.js +0.42% 186.51 kB 187.29 kB +0.58% 33.65 kB 33.85 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js +0.41% 190.16 kB 190.94 kB +0.56% 34.45 kB 34.65 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +0.41% 190.74 kB 191.52 kB +0.55% 34.57 kB 34.76 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js +0.40% 194.28 kB 195.06 kB +0.59% 34.98 kB 35.19 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +0.40% 194.38 kB 195.16 kB +0.59% 35.00 kB 35.20 kB
oss-stable-semver/react-server-dom-esm/cjs/react-server-dom-esm-server.node.development.js +0.39% 199.14 kB 199.92 kB +0.54% 36.51 kB 36.71 kB
oss-stable/react-server-dom-esm/cjs/react-server-dom-esm-server.node.development.js +0.39% 199.14 kB 199.92 kB +0.54% 36.51 kB 36.71 kB
oss-stable-semver/react-server-dom-parcel/cjs/react-server-dom-parcel-server.node.development.js +0.38% 205.64 kB 206.42 kB +0.53% 37.18 kB 37.37 kB
oss-stable/react-server-dom-parcel/cjs/react-server-dom-parcel-server.node.development.js +0.38% 205.64 kB 206.42 kB +0.53% 37.18 kB 37.37 kB
oss-experimental/react-server-dom-esm/cjs/react-server-dom-esm-server.node.development.js +0.38% 206.66 kB 207.44 kB +0.51% 37.78 kB 37.98 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +0.37% 212.37 kB 213.15 kB +0.51% 38.28 kB 38.48 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +0.37% 212.37 kB 213.15 kB +0.51% 38.28 kB 38.48 kB
oss-experimental/react-server-dom-parcel/cjs/react-server-dom-parcel-server.node.development.js +0.37% 213.16 kB 213.94 kB +0.49% 38.45 kB 38.64 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js +0.37% 213.52 kB 214.30 kB +0.52% 38.56 kB 38.76 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js +0.37% 213.52 kB 214.30 kB +0.52% 38.56 kB 38.76 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +0.37% 213.58 kB 214.36 kB +0.51% 38.57 kB 38.77 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +0.37% 213.58 kB 214.36 kB +0.51% 38.57 kB 38.77 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +0.36% 219.89 kB 220.68 kB +0.48% 39.54 kB 39.74 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js +0.35% 221.05 kB 221.83 kB +0.48% 39.83 kB 40.03 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +0.35% 221.10 kB 221.88 kB +0.48% 39.84 kB 40.03 kB

Generated by 🚫 dangerJS against 1d30067

@eps1lon eps1lon marked this pull request as ready for review August 12, 2025 20:04
@eps1lon eps1lon requested a review from sebmarkbage August 12, 2025 20:04
@eps1lon eps1lon merged commit 0032b2a into facebook:main Aug 13, 2025
250 checks passed
@eps1lon eps1lon deleted the sebbie/flight-prod-elements branch August 13, 2025 06:48
github-actions bot pushed a commit that referenced this pull request Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants