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.
B
Brian Vaughn committed
b8bbb6a13d0d0fc93bd1bf51bd66d626aad84672
Parent: ebcec3c
Committed by GitHub <[email protected]>
on 5/20/2021, 3:24:08 PM