dillon1000/react

Commit

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.
Browse files
Changed paths2 files
First-parent comparison
M packages/react-devtools-shared/src/__tests__/inspectedElement-test.js ModifiedM packages/react-devtools-shared/src/backend/renderer.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…