@samitouri / QOS-React / commits / 44f8451ede

[DevTools] Avoid tearing Suspense store (#34294)

Sebastian "Sebbie" Silbermann committed Aug 26, 2025 at 17:09 UTC 44f8451ede5001b2c31de339890b9160fc06e436
2 files changed +3 -3
packages/react-devtools-shared/src/devtools/views/SuspenseTab/SuspenseRects.js
+1 -1
@@ -55,7 +55,7 @@ function SuspenseRects({
55
56 const suspense = store.getSuspenseByID(suspenseID);
57 if (suspense === null) {
58 - console.warn(`<Element> Could not find suspense node id ${suspenseID}`);
58 + // getSuspenseByID will have already warned
59 return null;
60 }
61
packages/react-devtools-shared/src/devtools/views/SuspenseTab/SuspenseTreeContext.js
+2 -2
@@ -81,7 +81,7 @@ function SuspenseTreeContextController({children}: Props): React.Node {
81
82 useEffect(() => {
83 const handleSuspenseTreeMutated = () => {
84 - transitionDispatch({
84 + dispatch({
85 type: 'HANDLE_SUSPENSE_TREE_MUTATION',
86 });
87 };
@@ -91,7 +91,7 @@ function SuspenseTreeContextController({children}: Props): React.Node {
91 // At the moment, we can treat this as a mutation.
92 // We don't know which Elements were newly added/removed, but that should be okay in this case.
93 // It would only impact the search state, which is unlikely to exist yet at this point.
94 - transitionDispatch({
94 + dispatch({
95 type: 'HANDLE_SUSPENSE_TREE_MUTATION',
96 });
97 }