Skip to content

Commit 7a0f459

Browse files
author
Brian Vaughn
committed
Remember the selected Profiler (sub)tab between sessions
1 parent 245d7c3 commit 7a0f459

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/react-devtools-shared/src/devtools/views/Profiler/ProfilerContext.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@ function ProfilerContextController({children}: Props) {
212212
const [selectedCommitIndex, selectCommitIndex] = useState<number | null>(
213213
null,
214214
);
215-
const [selectedTabID, selectTab] = useState<TabID>('flame-chart');
215+
const [selectedTabID, selectTab] = useLocalStorage<TabID>(
216+
'React::DevTools::Profiler::defaultTab',
217+
'flame-chart',
218+
);
216219

217220
if (isProfiling) {
218221
batchedUpdates(() => {

0 commit comments

Comments
 (0)