react icon indicating copy to clipboard operation
react copied to clipboard

[Flight] Add failing test to reproduce issue with `Object.freeze`

Open unstubbable opened this issue 1 year ago • 3 comments

Here's a failing test that demonstrates the issue as reported by @eps1lon in https://github.com/facebook/react/pull/29032#discussion_r1604250460.

https://github.com/facebook/react/blob/3f1436cca1f8dd80a19fd52b97b6ff71a4d9ce82/packages/react-client/src/ReactFlightClient.js#L644

When the props object is frozen, the Flight Client's model resolver can't mutate the parent object (i.e. the props) anymore, after the client component that was referenced in the props has been loaded.

https://github.com/facebook/react/blob/3f1436cca1f8dd80a19fd52b97b6ff71a4d9ce82/packages/react-client/src/ReactFlightClient.js#L701

unstubbable avatar May 17 '24 08:05 unstubbable

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 17, 2024 2:38pm

vercel[bot] avatar May 17 '24 08:05 vercel[bot]

Comparing: 3f1436cca1f8dd80a19fd52b97b6ff71a4d9ce82...3e6397f040e1fa42936bf27308c7c227fb1bf2cb

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.66 kB 6.66 kB +0.05% 1.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 495.01 kB 495.01 kB = 88.68 kB 88.68 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.67 kB 6.67 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 499.81 kB 499.81 kB = 89.36 kB 89.36 kB
facebook-www/ReactDOM-prod.classic.js = 592.16 kB 592.16 kB = 104.15 kB 104.15 kB
facebook-www/ReactDOM-prod.modern.js = 568.39 kB 568.39 kB = 100.55 kB 100.55 kB
test_utils/ReactAllWarnings.js Deleted 64.26 kB 0.00 kB Deleted 16.02 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 64.26 kB 0.00 kB Deleted 16.02 kB 0.00 kB

Generated by :no_entry_sign: dangerJS against 3e6397f040e1fa42936bf27308c7c227fb1bf2cb

react-sizebot avatar May 17 '24 08:05 react-sizebot

Thank you for the minimal repro!

eps1lon avatar May 17 '24 11:05 eps1lon