From 1ea46df8ba9d7d90a13c8668c2642cb21a259aa5 Mon Sep 17 00:00:00 2001 From: "Sebastian \"Sebbie\" Silbermann" Date: Tue, 11 Nov 2025 23:20:22 +0100 Subject: [PATCH] [DevTools] Batch updates when updating component filters (#35093) --- .../react-devtools-shared/src/backend/fiber/renderer.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/react-devtools-shared/src/backend/fiber/renderer.js b/packages/react-devtools-shared/src/backend/fiber/renderer.js index 1a7586a4c5..fa802e53a6 100644 --- a/packages/react-devtools-shared/src/backend/fiber/renderer.js +++ b/packages/react-devtools-shared/src/backend/fiber/renderer.js @@ -1576,7 +1576,6 @@ export function attach( currentRoot = rootInstance; unmountInstanceRecursively(rootInstance); rootToFiberInstanceMap.delete(root); - flushPendingEvents(); currentRoot = (null: any); }); @@ -1646,7 +1645,6 @@ export function attach( currentRoot = newRoot; setRootPseudoKey(currentRoot.id, root.current); mountFiberRecursively(root.current, false); - flushPendingEvents(); currentRoot = (null: any); }); @@ -5751,11 +5749,12 @@ export function attach( mountFiberRecursively(root.current, false); - flushPendingEvents(); - - needsToFlushComponentLogs = false; currentRoot = (null: any); }); + + flushPendingEvents(); + + needsToFlushComponentLogs = false; } }