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

Include the function name for context on invalid function child #28362

Merged
merged 1 commit into from
Feb 17, 2024

Conversation

sebmarkbage
Copy link
Collaborator

@sebmarkbage sebmarkbage commented Feb 17, 2024

Also warn for symbols.

It's weird because for objects we throw a hard error but functions we do a dev only check. Mainly because we have an object branch anyway.

In the object branch we have some built-ins that have bad errors like forwardRef and memo but since they're going to become functions later, I didn't bother updating those. Once they're functions those names will be part of this.

@react-sizebot
Copy link

react-sizebot commented Feb 17, 2024

Comparing: 6a44f35...c3a147e

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 = 177.01 kB 177.01 kB = 55.17 kB 55.17 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 179.00 kB 179.00 kB = 55.74 kB 55.74 kB
facebook-www/ReactDOM-prod.classic.js = 592.58 kB 592.58 kB = 104.54 kB 104.54 kB
facebook-www/ReactDOM-prod.modern.js = 575.87 kB 575.87 kB = 101.55 kB 101.55 kB
test_utils/ReactAllWarnings.js Deleted 66.25 kB 0.00 kB Deleted 16.31 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-stable-semver/react-server/cjs/react-server.development.js +0.23% 199.89 kB 200.35 kB +0.22% 46.94 kB 47.04 kB
oss-stable/react-server/cjs/react-server.development.js +0.23% 199.89 kB 200.35 kB +0.22% 46.94 kB 47.04 kB
oss-experimental/react-server/cjs/react-server.development.js +0.22% 211.35 kB 211.81 kB +0.22% 48.89 kB 49.00 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-dev.js +0.21% 932.51 kB 934.46 kB +0.11% 186.19 kB 186.40 kB
facebook-www/ReactTestRenderer-dev.modern.js +0.21% 942.32 kB 944.27 kB +0.11% 187.78 kB 187.99 kB
facebook-www/ReactTestRenderer-dev.classic.js +0.21% 942.32 kB 944.28 kB +0.11% 187.78 kB 187.99 kB
react-native/implementations/ReactFabric-dev.js +0.20% 976.72 kB 978.68 kB +0.11% 196.69 kB 196.89 kB
test_utils/ReactAllWarnings.js Deleted 66.25 kB 0.00 kB Deleted 16.31 kB 0.00 kB

Generated by 🚫 dangerJS against c3a147e

@sebmarkbage
Copy link
Collaborator Author

sebmarkbage commented Feb 17, 2024

These probably would be more useful with owners instead of parents since the parent is essentially always a host component but that might not be where you passed the child.

The problem is that we don't have an owner stashed for the function itself since it's not an element. So this is the best we can do.

@sebmarkbage sebmarkbage merged commit c1fd2a9 into facebook:main Feb 17, 2024
36 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 17, 2024
Also warn for symbols.

It's weird because for objects we throw a hard error but functions we do
a dev only check. Mainly because we have an object branch anyway.

In the object branch we have some built-ins that have bad errors like
forwardRef and memo but since they're going to become functions later, I
didn't bother updating those. Once they're functions those names will be
part of this.

DiffTrain build for [c1fd2a9](c1fd2a9)
sebmarkbage added a commit that referenced this pull request Feb 19, 2024
…client component (#28367)

Similar to #28362 but if you pass it to a client component.
github-actions bot pushed a commit that referenced this pull request Feb 19, 2024
…client component (#28367)

Similar to #28362 but if you pass it to a client component.

DiffTrain build for [2e84e16](2e84e16)
huozhi added a commit to vercel/next.js that referenced this pull request Feb 23, 2024
### React upstream changes

- facebook/react#28333
- facebook/react#28334
- facebook/react#28378
- facebook/react#28377
- facebook/react#28376
- facebook/react#28338
- facebook/react#28331
- facebook/react#28336
- facebook/react#28320
- facebook/react#28317
- facebook/react#28375
- facebook/react#28367
- facebook/react#28380
- facebook/react#28368
- facebook/react#28343
- facebook/react#28355
- facebook/react#28374
- facebook/react#28362
- facebook/react#28344
- facebook/react#28339
- facebook/react#28353
- facebook/react#28346
- facebook/react#25790
- facebook/react#28352
- facebook/react#28326
- facebook/react#27688
- facebook/react#28329
- facebook/react#28332
- facebook/react#28340
- facebook/react#28327
- facebook/react#28325
- facebook/react#28324
- facebook/react#28309
- facebook/react#28310
- facebook/react#28307
- facebook/react#28306
- facebook/react#28315
- facebook/react#28318
- facebook/react#28226
- facebook/react#28308
- facebook/react#27563
- facebook/react#28297
- facebook/react#28286
- facebook/react#28284
- facebook/react#28275
- facebook/react#28145
- facebook/react#28301
- facebook/react#28224
- facebook/react#28152
- facebook/react#28296
- facebook/react#28294
- facebook/react#28279
- facebook/react#28273
- facebook/react#28269
- facebook/react#28376
- facebook/react#28338
- facebook/react#28331
- facebook/react#28336
- facebook/react#28320
- facebook/react#28317
- facebook/react#28375
- facebook/react#28367
- facebook/react#28380
- facebook/react#28368
- facebook/react#28343
- facebook/react#28355
- facebook/react#28374
- facebook/react#28362
- facebook/react#28344
- facebook/react#28339
- facebook/react#28353
- facebook/react#28346
- facebook/react#25790
- facebook/react#28352
- facebook/react#28326
- facebook/react#27688
- facebook/react#28329
- facebook/react#28332
- facebook/react#28340
- facebook/react#28327
- facebook/react#28325
- facebook/react#28324
- facebook/react#28309
- facebook/react#28310
- facebook/react#28307
- facebook/react#28306
- facebook/react#28315
- facebook/react#28318
- facebook/react#28226
- facebook/react#28308
- facebook/react#27563
- facebook/react#28297
- facebook/react#28286
- facebook/react#28284
- facebook/react#28275
- facebook/react#28145
- facebook/react#28301
- facebook/react#28224
- facebook/react#28152
- facebook/react#28296
- facebook/react#28294
- facebook/react#28279
- facebook/react#28273
- facebook/react#28269

Closes NEXT-2542


Disable ppr test for strict mode for now, @acdlite will check it and
we'll sync again
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
…book#28362)

Also warn for symbols.

It's weird because for objects we throw a hard error but functions we do
a dev only check. Mainly because we have an object branch anyway.

In the object branch we have some built-ins that have bad errors like
forwardRef and memo but since they're going to become functions later, I
didn't bother updating those. Once they're functions those names will be
part of this.
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
…client component (facebook#28367)

Similar to facebook#28362 but if you pass it to a client component.
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
Also warn for symbols.

It's weird because for objects we throw a hard error but functions we do
a dev only check. Mainly because we have an object branch anyway.

In the object branch we have some built-ins that have bad errors like
forwardRef and memo but since they're going to become functions later, I
didn't bother updating those. Once they're functions those names will be
part of this.

DiffTrain build for commit c1fd2a9.
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
…client component (#28367)

Similar to #28362 but if you pass it to a client component.

DiffTrain build for commit 2e84e16.
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.

4 participants