Skip to content

Commit 1ea46df

Browse files
authored
[DevTools] Batch updates when updating component filters (facebook#35093)
1 parent 8c15edd commit 1ea46df

File tree

1 file changed

+4
-5
lines changed
  • packages/react-devtools-shared/src/backend/fiber

1 file changed

+4
-5
lines changed

packages/react-devtools-shared/src/backend/fiber/renderer.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,6 @@ export function attach(
15761576
currentRoot = rootInstance;
15771577
unmountInstanceRecursively(rootInstance);
15781578
rootToFiberInstanceMap.delete(root);
1579-
flushPendingEvents();
15801579
currentRoot = (null: any);
15811580
});
15821581
@@ -1646,7 +1645,6 @@ export function attach(
16461645
currentRoot = newRoot;
16471646
setRootPseudoKey(currentRoot.id, root.current);
16481647
mountFiberRecursively(root.current, false);
1649-
flushPendingEvents();
16501648
currentRoot = (null: any);
16511649
});
16521650
@@ -5751,11 +5749,12 @@ export function attach(
57515749
57525750
mountFiberRecursively(root.current, false);
57535751
5754-
flushPendingEvents();
5755-
5756-
needsToFlushComponentLogs = false;
57575752
currentRoot = (null: any);
57585753
});
5754+
5755+
flushPendingEvents();
5756+
5757+
needsToFlushComponentLogs = false;
57595758
}
57605759
}
57615760

0 commit comments

Comments
 (0)