[bug] Fix component name for Portal and add tests (#32640)
Based off: https://github.com/facebook/react/pull/32499 While looking into `React.lazy` issues for built-ins, I noticed we already error for `lazy` with build-ins, but we don't have any tests for `getComponentNameFromType` using all the built-ins. This may be something we should handle, but for now we should at least have tests. Here's why: while writing tests, I noticed we check `type` instead of `$$typeof` for portals: https://github.com/facebook/react/blob/9cdf8a99edcfd94d7420835ea663edca04237527/packages/react-reconciler/src/ReactPortal.js#L25-L32 This PR adds tests for all the built-ins and fixes the portal bug. [Commit to review](https://github.com/facebook/react/pull/32640/commits/e068c167d48d4df01e79db8f13276bb46d7ab439)
R
Ricky committed
8243f3f0631698e819c690710a7f18f767068981
Parent: df31952
Committed by GitHub <[email protected]>
on 3/17/2025, 3:23:28 PM