Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression test for props object equality in React 19 #28980

Closed
wants to merge 1 commit into from

Conversation

kassens
Copy link
Member

@kassens kassens commented May 2, 2024

Regression test for props object equality in React 19

Without enableRefAsProp, props passed to lifecycle methods would be equal. This was broken with the enableRefAsProp flag that's supposed to ship with React 19.

@kassens kassens requested a review from acdlite May 2, 2024 23:05
@facebook-github-bot facebook-github-bot added the React Core Team Opened by a member of the React Core Team label May 2, 2024
@react-sizebot
Copy link

react-sizebot commented May 2, 2024

Comparing: 1d618a9...2801759

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 = 492.61 kB 492.61 kB = 87.88 kB 87.88 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 = 498.86 kB 498.86 kB = 88.93 kB 88.93 kB
facebook-www/ReactDOM-prod.classic.js = 591.22 kB 591.22 kB = 103.96 kB 103.96 kB
facebook-www/ReactDOM-prod.modern.js = 567.44 kB 567.44 kB = 100.36 kB 100.36 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 🚫 dangerJS against 2801759

Without `enableRefAsProp`, `props` passed to lifecycle methods would be equal. This was broken with the `enableRefAsProp` flag that's supposed to ship with React 19.
@kassens kassens changed the title Repro for string ref + enableRefAsProp unstable props Regression test for props object equality in React 19 May 3, 2024
@kassens kassens requested a review from rickhanlonii May 3, 2024 16:23
@kassens kassens closed this May 8, 2024
@kassens
Copy link
Member Author

kassens commented May 8, 2024

This was an intentional tradeoff.

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 React 19
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants