diff --git a/packages/react-debug-tools/src/ReactDebugHooks.js b/packages/react-debug-tools/src/ReactDebugHooks.js index 3657ed2db059a..cff48e9113691 100644 --- a/packages/react-debug-tools/src/ReactDebugHooks.js +++ b/packages/react-debug-tools/src/ReactDebugHooks.js @@ -310,15 +310,11 @@ function useTransition(): [ } function useDeferredValue(value: T): T { - // useDeferredValue() composes multiple hooks internally. - // Advance the current hook index the same number of times - // so that subsequent hooks have the right memoized state. - nextHook(); // State - nextHook(); // Effect + const hook = nextHook(); hookLog.push({ primitive: 'DeferredValue', stackError: new Error(), - value, + value: hook !== null ? hook.memoizedState[0] : value, }); return value; }