mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
cfa201d0aec380b778300814e44c4d6f21b4474b
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)
DiffTrain build for [8243f3f063](https://github.com/facebook/react/commit/8243f3f0631698e819c690710a7f18f767068981)
react-fbsource-import
Description
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%