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 — Include the function name for context on invalid function child by sebmarkbage · Pull Request #28362 · react/react

Conversation

@sebmarkbage

@sebmarkbage sebmarkbage commented Feb 17, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

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

All reactions
@sebmarkbage
sebmarkbage requested review from acdlite, eps1lon, gaearon and rickhanlonii February 17, 2024 05:57
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Feb 17, 2024
@sebmarkbage
sebmarkbage force-pushed the invalidchilderror branch from 4ff3bad to c492782 Compare February 17, 2024 05:59
@react-sizebot

react-sizebot commented Feb 17, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@sebmarkbage
sebmarkbage force-pushed the invalidchilderror branch from c492782 to 143e13f Compare February 17, 2024 06:06
acdlite
acdlite approved these changes Feb 17, 2024
View reviewed changes
@sebmarkbage

sebmarkbage commented Feb 17, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

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

@sebmarkbage
Include the function name for context on invalid function child
c3a147e
Also warn for symbols.
@sebmarkbage
sebmarkbage force-pushed the invalidchilderror branch from 143e13f to c3a147e Compare February 17, 2024 21:33
@sebmarkbage
sebmarkbage merged commit c1fd2a9 into react:main Feb 17, 2024
github-actions Bot pushed a commit that referenced this pull request Feb 17, 2024
@sebmarkbage
Include the function name for context on invalid function child (#28362)
43967e7
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 sebmarkbage mentioned this pull request Feb 18, 2024
[Flight] Better error message if you pass a function as a child to a client component #28367
Merged
sebmarkbage added a commit that referenced this pull request Feb 19, 2024
@sebmarkbage
[Flight] Better error message if you pass a function as a child to a …
2e84e16
…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
@sebmarkbage
[Flight] Better error message if you pass a function as a child to a …
3ff23f9
…client component (#28367)

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

DiffTrain build for [2e84e16](2e84e16)
This was referenced Feb 20, 2024
Bump vendored react versions vercel/next.js#62302
Closed
Upgrade vendored react vercel/next.js#62326
Merged
huozhi added a commit to vercel/next.js that referenced this pull request Feb 23, 2024
@huozhi
Upgrade vendored react (#62326)
e5d604f
### React upstream changes

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

Closes NEXT-2542


Disable ppr test for strict mode for now, @acdlite will check it and
we'll sync again
@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
@sebmarkbage @AndyPengc12
Include the function name for context on invalid function child (reac…
23a7843
…t#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
@sebmarkbage @AndyPengc12
[Flight] Better error message if you pass a function as a child to a …
086cfc2
…client component (react#28367)

Similar to react#28362 but if you pass it to a client component.
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
@sebmarkbage
Include the function name for context on invalid function child (#28362)
9452c20
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
@sebmarkbage
[Flight] Better error message if you pass a function as a child to a …
469809a
…client component (#28367)

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

DiffTrain build for commit 2e84e16.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@sebmarkbage
Include the function name for context on invalid function child (reac…
d0d8fc9
…t#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.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@sebmarkbage
[Flight] Better error message if you pass a function as a child to a …
71385ce
…client component (react#28367)

Similar to react#28362 but if you pass it to a client component.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@acdlite acdlite acdlite approved these changes
@gaearon gaearon Awaiting requested review from gaearon
@rickhanlonii rickhanlonii Awaiting requested review from rickhanlonii
@eps1lon eps1lon Awaiting requested review from eps1lon

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

@sebmarkbage @react-sizebot @acdlite @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.