mirror of
https://github.com/facebook/react.git
synced 2026-02-24 04:33:04 +00:00
https://github.com/facebook/react/pull/26740 introduced regression: React DevTools doesn't record updates for `useTransition` hook. I can add more details about things on DevTools side, if needed. The root cause is491aec5d61/packages/react-reconciler/src/ReactFiberHooks.js (L2728-L2730)React DevTools expects dispatch to be present for stateful hooks that can schedule an update -2eed132847/packages/react-devtools-shared/src/backend/renderer.js (L1422-L1428)With these changes, we still call dispatch in `startTransition`, but also patch `queue` object with it, so that React DevTools can recognise `useTransition` as stateful hook that can schedule update. I am not sure if this is the right approach to fix this, can we distinguish if `startTransition` was called from `useTransition` hook or as a standalone function?
This directory contains code shared between several DevTools packages:
- /packages/react-devtools-core
- /packages/react-devtools-extensions
- /packages/react-devtools-inline
It is not published or released anywhere directly.