GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — jsx(): Inline reserved prop checks by acdlite · Pull Request #28262 · react/react

Conversation

@acdlite

@acdlite acdlite commented Feb 6, 2024

Copy link
Copy Markdown
Collaborator

The JSX runtime (both the new one and the classic createElement runtime) check for reserved props like key and ref by doing a lookup in a plain object map with hasOwnProperty.

There are only a few reserved props so this inlines the checks instead.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@acdlite
jsx(): Inline reserved prop checks
8144840
The JSX runtime (both the new one and the classic createElement runtime)
check for reserved props like `key` and `ref` by doing a lookup in
a plain object map with `hasOwnProperty`.

There are only a few reserved props so this inlines the checks instead.
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Feb 6, 2024
sebmarkbage
sebmarkbage approved these changes Feb 6, 2024
View reviewed changes
@react-sizebot

react-sizebot commented Feb 6, 2024

Copy link
Copy Markdown

Comparing: 0d11563...8144840

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.min.js = 176.66 kB 176.66 kB = 55.01 kB 55.01 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 178.65 kB 178.65 kB = 55.59 kB 55.59 kB
facebook-www/ReactDOM-prod.classic.js = 591.78 kB 591.78 kB = 104.44 kB 104.44 kB
facebook-www/ReactDOM-prod.modern.js = 575.53 kB 575.53 kB = 101.54 kB 101.54 kB
test_utils/ReactAllWarnings.js Deleted 67.02 kB 0.00 kB Deleted 16.42 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
oss-experimental/react/cjs/react-jsx-runtime.profiling.js +1.62% 4.07 kB 4.13 kB +1.38% 1.82 kB 1.84 kB
oss-stable-semver/react/cjs/react-jsx-runtime.profiling.js +1.62% 4.07 kB 4.13 kB +1.38% 1.82 kB 1.84 kB
oss-stable/react/cjs/react-jsx-runtime.profiling.js +1.62% 4.07 kB 4.13 kB +1.38% 1.82 kB 1.84 kB
oss-experimental/react/cjs/react-jsx-runtime.production.js +1.62% 4.07 kB 4.14 kB +1.43% 1.82 kB 1.84 kB
oss-stable-semver/react/cjs/react-jsx-runtime.production.js +1.62% 4.07 kB 4.14 kB +1.43% 1.82 kB 1.84 kB
oss-stable/react/cjs/react-jsx-runtime.production.js +1.62% 4.07 kB 4.14 kB +1.43% 1.82 kB 1.84 kB
oss-experimental/react/cjs/react-jsx-runtime.react-server.production.js +1.59% 4.15 kB 4.22 kB +1.40% 1.85 kB 1.88 kB
oss-stable-semver/react/cjs/react-jsx-runtime.react-server.production.js +1.59% 4.15 kB 4.22 kB +1.40% 1.85 kB 1.88 kB
oss-stable/react/cjs/react-jsx-runtime.react-server.production.js +1.59% 4.15 kB 4.22 kB +1.40% 1.85 kB 1.88 kB
oss-stable-semver/react/cjs/react.react-server.production.js +0.77% 29.47 kB 29.70 kB +0.28% 8.88 kB 8.90 kB
oss-stable/react/cjs/react.react-server.production.js +0.77% 29.50 kB 29.73 kB +0.29% 8.91 kB 8.93 kB
oss-stable-semver/react/cjs/react.production.js +0.66% 34.37 kB 34.59 kB +0.49% 9.58 kB 9.62 kB
oss-stable/react/cjs/react.production.js +0.66% 34.39 kB 34.62 kB +0.49% 9.61 kB 9.65 kB
oss-experimental/react/cjs/react.react-server.production.js +0.63% 35.59 kB 35.82 kB +0.23% 10.56 kB 10.59 kB
oss-experimental/react/cjs/react.production.js +0.61% 37.00 kB 37.23 kB +0.26% 10.27 kB 10.30 kB
facebook-www/ReactServer-prod.modern.js +0.55% 14.89 kB 14.97 kB = 3.97 kB 3.96 kB
facebook-react-native/react/cjs/React-prod.js +0.46% 17.67 kB 17.76 kB = 4.61 kB 4.59 kB
facebook-react-native/react/cjs/React-profiling.js +0.46% 17.81 kB 17.90 kB = 4.61 kB 4.60 kB
facebook-www/React-prod.modern.js +0.45% 18.35 kB 18.43 kB = 4.71 kB 4.69 kB
facebook-www/React-prod.classic.js +0.44% 18.64 kB 18.72 kB = 4.78 kB 4.76 kB
facebook-www/React-profiling.modern.js +0.44% 18.78 kB 18.86 kB = 4.79 kB 4.77 kB
facebook-www/React-profiling.classic.js +0.43% 19.08 kB 19.16 kB = 4.86 kB 4.85 kB
oss-stable-semver/react/cjs/react.react-server.production.min.js +0.30% 7.00 kB 7.02 kB +0.07% 2.97 kB 2.98 kB
oss-stable/react/cjs/react.react-server.production.min.js +0.30% 7.02 kB 7.04 kB +0.10% 3.00 kB 3.00 kB
oss-stable-semver/react/cjs/react.react-server.development.js +0.30% 77.42 kB 77.65 kB +0.13% 21.43 kB 21.46 kB
oss-stable/react/cjs/react.react-server.development.js +0.30% 77.45 kB 77.68 kB +0.13% 21.46 kB 21.49 kB
facebook-www/ReactServer-dev.modern.js +0.29% 108.59 kB 108.91 kB +0.01% 25.99 kB 25.99 kB
oss-experimental/react/cjs/react.react-server.development.js +0.27% 83.88 kB 84.11 kB +0.11% 23.33 kB 23.35 kB
facebook-react-native/react/cjs/React-dev.js +0.25% 128.87 kB 129.19 kB +0.02% 29.77 kB 29.78 kB
facebook-www/React-dev.modern.js +0.23% 140.93 kB 141.25 kB +0.03% 34.16 kB 34.17 kB
oss-stable-semver/react/cjs/react.development.js +0.23% 101.72 kB 101.95 kB +0.08% 27.22 kB 27.25 kB
oss-stable/react/cjs/react.development.js +0.23% 101.75 kB 101.98 kB +0.09% 27.25 kB 27.28 kB
facebook-www/React-dev.classic.js +0.22% 142.15 kB 142.47 kB +0.02% 34.41 kB 34.42 kB
oss-stable-semver/react/cjs/react.production.min.js +0.22% 8.10 kB 8.12 kB +0.26% 3.10 kB 3.11 kB
oss-stable/react/cjs/react.production.min.js +0.22% 8.12 kB 8.14 kB +0.29% 3.13 kB 3.14 kB
oss-experimental/react/cjs/react.development.js +0.22% 104.29 kB 104.51 kB +0.09% 27.89 kB 27.91 kB
oss-experimental/react/cjs/react.react-server.production.min.js +0.21% 9.04 kB 9.06 kB +0.08% 3.68 kB 3.68 kB
facebook-react-native/react/cjs/JSXRuntime-prod.js +0.20% 1.49 kB 1.49 kB = 0.73 kB 0.71 kB
facebook-react-native/react/cjs/JSXRuntime-profiling.js +0.20% 1.49 kB 1.49 kB = 0.73 kB 0.71 kB
oss-experimental/react/cjs/react-jsx-runtime.react-server.production.min.js = 0.92 kB 0.91 kB = 0.57 kB 0.56 kB
oss-stable-semver/react/cjs/react-jsx-runtime.react-server.production.min.js = 0.92 kB 0.91 kB = 0.57 kB 0.56 kB
oss-stable/react/cjs/react-jsx-runtime.react-server.production.min.js = 0.92 kB 0.91 kB = 0.57 kB 0.56 kB
oss-experimental/react/cjs/react-jsx-runtime.production.min.js = 0.90 kB 0.89 kB = 0.56 kB 0.55 kB
oss-stable-semver/react/cjs/react-jsx-runtime.production.min.js = 0.90 kB 0.89 kB = 0.56 kB 0.55 kB
oss-stable/react/cjs/react-jsx-runtime.production.min.js = 0.90 kB 0.89 kB = 0.56 kB 0.55 kB
oss-experimental/react/cjs/react-jsx-runtime.profiling.min.js = 0.90 kB 0.89 kB = 0.56 kB 0.55 kB
oss-stable-semver/react/cjs/react-jsx-runtime.profiling.min.js = 0.90 kB 0.89 kB = 0.56 kB 0.55 kB
oss-stable/react/cjs/react-jsx-runtime.profiling.min.js = 0.90 kB 0.89 kB = 0.56 kB 0.55 kB
test_utils/ReactAllWarnings.js Deleted 67.02 kB 0.00 kB Deleted 16.42 kB 0.00 kB

Generated by 🚫 dangerJS against 8144840

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@acdlite
acdlite merged commit 1beb941 into react:main Feb 6, 2024
github-actions Bot pushed a commit that referenced this pull request Feb 7, 2024
@acdlite
jsx(): Inline reserved prop checks (#28262)
de5b760
The JSX runtime (both the new one and the classic createElement runtime)
check for reserved props like `key` and `ref` by doing a lookup in a
plain object map with `hasOwnProperty`.

There are only a few reserved props so this inlines the checks instead.

DiffTrain build for [1beb941](1beb941)
@gaearon
gaearon deleted the jsx-inline-reserved-prop-checks branch February 8, 2024 16:18
@ztanner ztanner mentioned this pull request Feb 9, 2024
Update React from 2bc7d336a to ba5e6a832 vercel/next.js#61837
Merged
huozhi pushed a commit to vercel/next.js that referenced this pull request Feb 9, 2024
@ztanner
Update React from 2bc7d336a to ba5e6a832 (#61837)
f165514
Updates React from 2bc7d336a to ba5e6a832.

### React upstream changes

- react/react#28283
- react/react#28280
- react/react#28079
- react/react#28233
- react/react#28276
- react/react#28272
- react/react#28265
- react/react#28259
- react/react#28153
- react/react#28246
- react/react#28218
- react/react#28263
- react/react#28257
- react/react#28261
- react/react#28262
- react/react#28260
- react/react#28258
- react/react#27864
- react/react#28254
- react/react#28219
- react/react#28248
- react/react#28216
- react/react#28249
- react/react#28241
- react/react#28243
- react/react#28253
- react/react#28256
- react/react#28236
- react/react#28237
- react/react#28242
- react/react#28251
- react/react#28252

Closes NEXT-2411
@ztanner ztanner mentioned this pull request Mar 19, 2024
(backport) Update React from 60a927d04 to 14898b6a9 vercel/next.js#63442
Closed
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
@acdlite @AndyPengc12
jsx(): Inline reserved prop checks (react#28262)
2e4e662
The JSX runtime (both the new one and the classic createElement runtime)
check for reserved props like `key` and `ref` by doing a lookup in a
plain object map with `hasOwnProperty`.

There are only a few reserved props so this inlines the checks instead.
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
@acdlite
jsx(): Inline reserved prop checks (#28262)
571a247
The JSX runtime (both the new one and the classic createElement runtime)
check for reserved props like `key` and `ref` by doing a lookup in a
plain object map with `hasOwnProperty`.

There are only a few reserved props so this inlines the checks instead.

DiffTrain build for commit 1beb941.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@acdlite
jsx(): Inline reserved prop checks (react#28262)
960b293
The JSX runtime (both the new one and the classic createElement runtime)
check for reserved props like `key` and `ref` by doing a lookup in a
plain object map with `hasOwnProperty`.

There are only a few reserved props so this inlines the checks instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@sebmarkbage sebmarkbage sebmarkbage approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@acdlite @react-sizebot @sebmarkbage @facebook-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.