Skip to content

Commit 3704cb4

Browse files
committed
Remove 'unmount' trace origin from trace panel
It would never actually highlight since the panel is gone after the unmount.
1 parent 7275aa9 commit 3704cb4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/react-hook-tracer/src/components/TracePanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ export const TracePanel = ({
4848
.getObjectKeys(props)
4949
.map((key) => ({ propKey: key, propValue: props[key] }))
5050

51-
const { mount, render, trace, unmount, hooks } = traceOrigins
52-
const traceOriginList: TraceOrigin[] = [mount, render, ...hooks, trace, unmount]
51+
const { mount, render, trace, hooks } = traceOrigins
52+
const traceOriginList: TraceOrigin[] = [mount, render, ...hooks, trace]
5353

5454
return (
5555
<div className="trace-panel" data-testid="trace-panel">

packages/react-hook-tracer/src/hooks/useTracer.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ test('renders TracePanel', () => {
2727
'effect',
2828
'callback',
2929
'trace',
30-
'unmount',
3130
])
3231
})
3332

0 commit comments

Comments
 (0)