dillon1000/react

Commit

Include the function name for context on invalid function child (#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.
Browse files
Changed paths5 files
First-parent comparison
M packages/react-dom/src/__tests__/ReactComponent-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMRoot-test.js ModifiedM packages/react-dom/src/__tests__/ReactLegacyMount-test.js ModifiedM packages/react-reconciler/src/ReactChildFiber.js ModifiedM packages/react-server/src/ReactFizzServer.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…