We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 522f473 commit 73bd191Copy full SHA for 73bd191
packages/react-debug-tools/src/ReactDebugHooks.js
@@ -310,15 +310,11 @@ function useTransition(): [
310
}
311
312
function useDeferredValue<T>(value: T): T {
313
- // useDeferredValue() composes multiple hooks internally.
314
- // Advance the current hook index the same number of times
315
- // so that subsequent hooks have the right memoized state.
316
- nextHook(); // State
317
- nextHook(); // Effect
+ const hook = nextHook();
318
hookLog.push({
319
primitive: 'DeferredValue',
320
stackError: new Error(),
321
- value,
+ value: hook !== null ? hook.memoizedState[0] : value,
322
});
323
return value;
324
0 commit comments