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 5926765 commit 0e9cb3fCopy full SHA for 0e9cb3f
packages/react-reconciler/src/ReactFiberCommitWork.js
@@ -728,9 +728,14 @@ function detachFiber(current: Fiber) {
728
// itself will be GC:ed when the parent updates the next time.
729
current.return = null;
730
current.child = null;
731
- if (current.alternate) {
732
- current.alternate.child = null;
733
- current.alternate.return = null;
+ current.memoizedState = null;
+ current.updateQueue = null;
+ const alternate = current.alternate;
734
+ if (alternate !== null) {
735
+ alternate.return = null;
736
+ alternate.child = null;
737
+ alternate.memoizedState = null;
738
+ alternate.updateQueue = null;
739
}
740
741
0 commit comments