dillon1000/react
Commit
Browse files Fix edge-case Fast Refresh bug that caused Fibers with warnings/errors to be untracked prematurely (#21536)
Refactor error/warning count tracking to avoid pre-allocating an ID for Fibers that aren't yet mounted. Instead, we store a temporary reference to the Fiber itself and later check to see if it successfully mounted before merging pending error/warning counts. This avoids a problematic edge case where a force-remounted Fiber (from Fast Refresh) caused us to untrack a Fiber that was still mounted, resulting in a DevTools error if that Fiber was inspected in the Components tab.
Changed paths2 files
First-parent comparisonpackages/react-devtools-shared/src/__tests__/inspectedElement-test.js ModifiedM packages/react-devtools-shared/src/backend/renderer.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…