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

[refactor] move isValidElementType to react-is #32518

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rickhanlonii
Copy link
Member

After owner stacks, we don't check this in ReactJSX, so it's really only used in react-is and memo. Neither of these are really accurate long term, because renderers can define their own element type.

So for memo I'm just changing it to a nullish check, which will allow custom renderer elements to be wrapped in memo, so we can move this to react-is so nothing internally starts using it.

@react-sizebot
Copy link

Comparing: e0fe347...972d226

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.05% 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 518.32 kB 518.32 kB = 92.45 kB 92.45 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 = 573.25 kB 573.25 kB = 102.08 kB 102.08 kB
facebook-www/ReactDOM-prod.classic.js = 641.70 kB 641.70 kB = 112.86 kB 112.86 kB
facebook-www/ReactDOM-prod.modern.js = 632.02 kB 632.02 kB = 111.30 kB 111.30 kB
facebook-www/React-dev.classic.js = 55.41 kB 54.22 kB = 12.07 kB 11.92 kB
facebook-www/React-dev.modern.js = 55.41 kB 54.22 kB = 12.07 kB 11.92 kB
oss-experimental/react/cjs/react.react-server.development.js = 35.90 kB 34.99 kB = 8.47 kB 8.35 kB
oss-stable/react/cjs/react.react-server.development.js = 28.86 kB 28.01 kB = 6.94 kB 6.81 kB
oss-stable-semver/react/cjs/react.react-server.development.js = 28.84 kB 27.98 kB = 6.91 kB 6.78 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
facebook-react-native/react/cjs/React-dev.js = 51.03 kB 50.23 kB = 11.36 kB 11.25 kB
oss-experimental/react/cjs/react.development.js = 46.95 kB 46.11 kB = 10.65 kB 10.53 kB
oss-stable/react/cjs/react.development.js = 45.21 kB 44.35 kB = 10.28 kB 10.15 kB
oss-stable-semver/react/cjs/react.development.js = 45.18 kB 44.33 kB = 10.26 kB 10.13 kB
facebook-www/React-dev.classic.js = 55.41 kB 54.22 kB = 12.07 kB 11.92 kB
facebook-www/React-dev.modern.js = 55.41 kB 54.22 kB = 12.07 kB 11.92 kB
oss-experimental/react/cjs/react.react-server.development.js = 35.90 kB 34.99 kB = 8.47 kB 8.35 kB
oss-stable/react/cjs/react.react-server.development.js = 28.86 kB 28.01 kB = 6.94 kB 6.81 kB
oss-stable-semver/react/cjs/react.react-server.development.js = 28.84 kB 27.98 kB = 6.91 kB 6.78 kB

Generated by 🚫 dangerJS against a9d4bf6

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