mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
[DevTools] Fix React Compiler badging (#31196)
In #31140 we switched over the uMC polyfill to use memo instead of state since memo would FastRefresh properly. However this busted devtools' badging of compiled components; this PR fixes it. TODO: tests Co-authored-by: Ruslan Lesiutin <[email protected]> --------- Co-authored-by: Ruslan Lesiutin <[email protected]>
This commit is contained in:
committed by
GitHub
co-authored by
Ruslan Lesiutin
parent
06624d2cfd
commit
59e174e216
@@ -599,6 +599,8 @@ export function getInternalReactConstants(version: string): {
|
||||
!shouldSkipForgetCheck &&
|
||||
// $FlowFixMe[incompatible-type] fiber.updateQueue is mixed
|
||||
(fiber.updateQueue?.memoCache != null ||
|
||||
(Array.isArray(fiber.memoizedState?.memoizedState) &&
|
||||
fiber.memoizedState.memoizedState[0]?.[REACT_MEMO_CACHE_SENTINEL]) ||
|
||||
fiber.memoizedState?.memoizedState?.[REACT_MEMO_CACHE_SENTINEL])
|
||||
) {
|
||||
const displayNameWithoutForgetWrapper = getDisplayNameForFiber(
|
||||
|
||||
Reference in New Issue
Block a user