Skip to content

Commit 62ff1e6

Browse files
authored
Revert "[DevTools] Always include the root in the timeline and select it by default" (facebook#34739)
Reverts facebook#34654
1 parent 0e79784 commit 62ff1e6

File tree

1 file changed

+0
-16
lines changed
  • packages/react-devtools-shared/src/devtools/views/SuspenseTab

1 file changed

+0
-16
lines changed

packages/react-devtools-shared/src/devtools/views/SuspenseTab/SuspenseTab.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ import {
3434
SuspenseTreeStateContext,
3535
} from './SuspenseTreeContext';
3636
import {StoreContext, OptionsContext} from '../context';
37-
import {
38-
TreeDispatcherContext,
39-
TreeStateContext,
40-
} from '../Components/TreeContext';
4137
import Button from '../Button';
4238
import Toggle from '../Toggle';
4339
import typeof {SyntheticPointerEvent} from 'react-dom-bindings/src/events/SyntheticEvent';
@@ -185,18 +181,6 @@ function SuspenseTab(_: {}) {
185181
treeListHorizontalFraction,
186182
} = state;
187183

188-
const {inspectedElementID} = useContext(TreeStateContext);
189-
const {timeline} = useContext(SuspenseTreeStateContext);
190-
const treeDispatch = useContext(TreeDispatcherContext);
191-
useLayoutEffect(() => {
192-
// If the inspected element is still null and we've loaded a timeline, we can set the initial selection.
193-
// TODO: This tab should use its own source of truth instead so we only show suspense boundaries.
194-
if (inspectedElementID === null && timeline.length > 0) {
195-
const milestone = timeline[timeline.length - 1];
196-
treeDispatch({type: 'SELECT_ELEMENT_BY_ID', payload: milestone});
197-
}
198-
}, [timeline, inspectedElementID]);
199-
200184
useLayoutEffect(() => {
201185
const wrapperElement = wrapperTreeRef.current;
202186

0 commit comments

Comments
 (0)